correct ant build-apidoc

This commit is contained in:
frank 2011-10-18 14:30:52 -07:00
parent 72db00c1c7
commit 625a601615
3 changed files with 8 additions and 65 deletions

View File

@ -78,7 +78,7 @@
<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"/>
<property name="apidoc.scripts.dir" location="${base.dir}/setup/bin/apidoc/"/>
<!-- directories for core code compilation-->
<property name="core.dir" location="${base.dir}/core" />
@ -323,19 +323,7 @@
<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" />

View File

@ -376,18 +376,20 @@
</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" />
<property name="commands.simulator.file" location="${tomcat.home}/conf/commands-simulator.properties" />
<target name="build-apidocs" description="Generate api documentation" depends="build-all-with-simulator">
<property name="commands.file" location="${dist.dir}/client/conf/commands.properties" />
<property name="commands.ext.file" location="${dist.dir}/client/conf/commands-ext.properties" />
<property name="commands.simulator.file" location="${dist.dir}/client/conf/commands-simulator.properties" />
<echo message="build-apidocs" />
<exec dir="${apidoc.scripts.dir}" executable="bash">
<arg value="build-apidoc.sh" />
<arg value="${target.dir}/jar" />
<arg value="${deps.dir}" />
<arg value="-f ${commands.file},${commands.ext.file},${commands.simulator.file}" />
<arg value="-d ${dist.dir}" />
<env key="CATALINA_HOME" value="${tomcat.home}"/>
</exec>
<echo message="Result locates at ${dist.dir}/commands.xml" />
<chmod perm="666">
<fileset dir="${apidoc.scripts.dir}">

View File

@ -1,47 +0,0 @@
#!/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