mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Ant target for apiDocs building
This commit is contained in:
parent
416efeb59a
commit
27d6020569
@ -70,12 +70,14 @@
|
||||
<property name="client.target.dir" location="${target.dir}/ui" />
|
||||
<property name="ui.user.dir" location="${base.dir}/ui" />
|
||||
<property name="setup.db.dir" location="${base.dir}/setup/db" />
|
||||
<property name="setup.apidoc.dir" location="${base.dir}/setup/apidoc" />
|
||||
|
||||
<!-- directories for server compilation-->
|
||||
<property name="server.dir" location="${base.dir}/server" />
|
||||
<property name="server.test.dir" location="${server.dir}/test" />
|
||||
<property name="server.dist.dir" location="${dist.dir}/client" />
|
||||
<property name="db.scripts.dir" location="${target.dir}/db"/>
|
||||
<property name="apidoc.scripts.dir" location="${target.dir}/apidoc"/>
|
||||
|
||||
<!-- directories for core code compilation-->
|
||||
<property name="core.dir" location="${base.dir}/core" />
|
||||
@ -304,8 +306,20 @@
|
||||
<filter token="VERSION" value="${impl.version}"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
|
||||
<copy overwrite="true" todir="${apidoc.scripts.dir}">
|
||||
<fileset dir="${setup.apidoc.dir}">
|
||||
<include name="**/*"/>
|
||||
</fileset>
|
||||
<filterset>
|
||||
<filter token="VERSION" value="${impl.version}"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
|
||||
<path id="console-common.classpath">
|
||||
<path refid="deps.classpath" />
|
||||
<path refid="dist.classpath" />
|
||||
|
||||
@ -21,6 +21,9 @@
|
||||
<property name="unittest.target.dir" location="${unittest.dir}/classes"/>
|
||||
<property name="unittest.jar.dir" location="${unittest.dir}/jar"/>
|
||||
|
||||
<!-- directories for api doc -->
|
||||
<property name="api.docs.dir" location="${dist.dir}/apidocs" />
|
||||
|
||||
<condition property="jmxport" value="${jmxport.override}" else="45219">
|
||||
<isset property="jmxport.override" />
|
||||
</condition>
|
||||
@ -338,5 +341,26 @@
|
||||
</junitreport>
|
||||
<fail if="junit.failure" message="Unit test(s) failed. See reports!"/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="build-apidocs" description="Generate api documentation">
|
||||
<property name="commands.file" location="${tomcat.home}/conf/commands.properties" />
|
||||
<property name="commands.ext.file" location="${tomcat.home}/conf/commands-ext.properties" />
|
||||
|
||||
<echo message="build-apidocs" />
|
||||
<exec dir="${apidoc.scripts.dir}" executable="bash">
|
||||
<arg value="build-apidoc.sh" />
|
||||
<arg value="-f ${commands.file},${commands.ext.file}" />
|
||||
<arg value="-d ${dist.dir}" />
|
||||
<env key="CATALINA_HOME" value="${tomcat.home}"/>
|
||||
</exec>
|
||||
|
||||
<chmod perm="666">
|
||||
<fileset dir="${apidoc.scripts.dir}">
|
||||
<include name="**/*"/>
|
||||
</fileset>
|
||||
</chmod>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
|
||||
47
setup/apidoc/build-apidoc.sh
Normal file
47
setup/apidoc/build-apidoc.sh
Normal file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2010 Cloud.com, Inc. All rights reserved.
|
||||
#
|
||||
# This software is licensed under the GNU General Public License v3 or later.
|
||||
#
|
||||
# It is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or any later version.
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
# cloud-build-api-doc.sh -- builds api documentation.
|
||||
#
|
||||
#set -x
|
||||
|
||||
PATHSEP=':'
|
||||
if [[ $OSTYPE == "cygwin" ]] ; then
|
||||
PATHSEP=';'
|
||||
fi
|
||||
|
||||
CP=$PATHSEP/
|
||||
|
||||
CP=${CP}$PATHSEP$CATALINA_HOME/conf
|
||||
|
||||
for file in $CATALINA_HOME/webapps/client/WEB-INF/lib/*.jar
|
||||
do
|
||||
CP=${CP}$PATHSEP$file
|
||||
done
|
||||
|
||||
for file in $CATALINA_HOME/lib/*.jar; do
|
||||
CP=${CP}$PATHSEP$file
|
||||
done
|
||||
|
||||
java -cp $CP com.cloud.api.doc.ApiXmlDocWriter $*
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
Loading…
x
Reference in New Issue
Block a user