blob: 7eb832cd746985b01c3bcbae8cc9527883ef4a4e [file] [log] [blame]
<project name="BuildAxisCSite" default="buildCsite" basedir="..">
<description>
================== [AXIS CPP SITE BUILDER] ==================
* This is an ant build-file for building the C web-site and ensuring that
* all the files are copied into the correct places.
* This version supports only Windows platforms.
*
* Here is how to run this build file
*
* Extract Axis C sources
* SVN checkout of https://svn.apache.org/repos/asf/webservices/axis/trunk/c. This will be refered to as [ws-axis/c] - basedir
* Extract documentation sources
* SVN checkout of: https://svn.apache.org/repos/asf/webservices/axis/trunk/site/. This will be refered to as [ws-axis/site] - dir.root.axis.site
* Extract web site
* SVN checkout of https://svn.apache.org/repos/asf/webservices/axis/site/. This will be refered to as [ws-site] - dir.root.site
* Make updates to documentation within [ws-axis/site]/src/cpp/src/documentation/content/xdocs/cpp
*
* Set environment variables: (using -D when running this script)
*
* dir.root.axis.site
* dir.root.site
* env.FORREST_HOME - install location of Forrest
*
* run this script
* Check output
* Found within [ws-axis/site]/src/cpp/build/site/cpp
*
* This script has already copied the output for you
* [ws-axis/site]/src/cpp/build/site/cpp/*.* to [ws-site]/cpp
* AND
* [ws-axis/site]/src/cpp/build/site/cpp/*.* to [ws-axis/c]/docs
* Now you must Commit changes to Axis C sources, documentation sources and web site (be sure to do an SVN add on any new files or SVN delete on unwanted files)
*
* In theory there is a script that runs on minotaur to upload the files to the actual
* website server (Minotaur) however if this is not working or you want your changes to appear immediately ->
* ssh into minotaur,
* cd to /www/ws.apache.org/axis and run "svn up" there.
</description>
<!-- include the if task from ant-contrib -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<property name="version" value="0.1"/>
<!-- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -->
<!-- CHANGE THE FOLLOWING PROPERTIES -->
<property name="IEPath" location="C:\Program Files\Internet Explorer"/>
<!-- -->
<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
<!-- need to import the main build.xml file from ws-site/trunk/ -->
<import file="${env.FORREST_HOME}/main/forrest.build.xml"/>
<target name="buildCsite" depends="checkConfiguration">
<trycatch property="message" reference="exception">
<try>
<antcall target="site" inheritall="true">
<param name="basedir" value="${dir.root.axis.site}/src/cpp"/>
</antcall>
</try>
<catch>
<echo>
Got a failure. But ignoring it because we keep getting it even when the site has been created ! Please check to ensure the site has been created OK
Message='${message}
Exception='${exception}
</echo>
</catch>
</trycatch>
<antcall target="copyIntoAxisCDocs" />
<antcall target="putmessage"/>
</target>
<target name="checkConfiguration">
<available property="ws-AxisSiteCorrect" file="${dir.root.axis.site}"/>
<if>
<equals arg1="${ws-AxisSiteCorrect}" arg2="true" />
<then>
<echo message="dir.root.axis.site verified as being there" />
</then>
<else>
<fail message="dir.root.axis.site is not there '${dir.root.axis.site}' is not correct? It should point to where you have extracted https://svn.apache.org/repos/asf/webservices/axis/site" />
</else>
</if>
<available property="ws-siteCorrect" file="${dir.root.site}"/>
<if>
<equals arg1="${ws-siteCorrect}" arg2="true" />
<then>
<echo message="Site verified as being there" />
</then>
<else>
<fail message="site is not there '${dir.root.site}' is not correct? It should point to where you extracted https://svn.apache.org/repos/afs/webservices/site" />
</else>
</if>
<available property="FORREST_HOMECorrect" file="${env.FORREST_HOME}"/>
<if>
<equals arg1="${FORREST_HOMECorrect}" arg2="true" />
<then>
<echo message="FORREST_HOME verified as being there" />
</then>
<else>
<fail message="FORREST_HOME is not set correctly? '${FORREST_HOME}' is not correct? It should point to where you installed FORREST" />
</else>
</if>
</target>
<target name="copyIntoAxisCDocs">
<echo>
Copying built documentation to website
cp [ws-axis/site]/src/cpp/build/site/cpp/*.* to [ws-site]/cpp
</echo>
<copy todir="${dir.root.site}/cpp">
<fileset dir="${dir.root.axis.site}/src/cpp/build/site/cpp/">
<different targetdir="${dir.root.axis.site}/cpp" ignoreFileTimes="true"/>
</fileset>
</copy>
<echo>
Copying built documentation to Axis C sources ready for packing steps at build time
cp [ws-axis/site]/src/cpp/build/site/cpp/*.* to [ws-axis/c]/docs
</echo>
<copy todir="${basedir}/docs">
<fileset dir="${dir.root.axis.site}/src/cpp/build/site/cpp/">
<different targetdir="${basedir}/docs" ignoreFileTimes="true"/>
</fileset>
</copy>
<echo message="=> DONE !!"/>
</target>
<target name="putmessage">
<echo>
(If you are a committer,) please commit your updates that have just been done in
'${dir.root.site}/cpp', '${dir.root.axis.site}/src/cpp/build/site/cpp/' and '${basedir}/docs' !!
</echo>
</target>
<!-- we override the one in the imported build.xml because it starts an explorer window which we don't want -->
<target name="build-site">
<antcall target="forrest"/>
<antcall target="replace"/>
</target>
</project>