awips2/edexOsgi/build.edex/deploy-common/deploy-esb.xml
Bryan Kowal 854081e77b Issue #1927 - handle the case where the python illusion does not exist.
Change-Id: I227b8fcb8a80e9e712c2b1b8a116324a604219b3

Former-commit-id: 4a1c34e0f4 [formerly 96f24ae69e] [formerly 7273b97aa4 [formerly 3af95f9f0a3449cbad2183a1ccda93c989c1e006]]
Former-commit-id: 7273b97aa4
Former-commit-id: 8b35bf6bda
2013-05-08 21:27:43 -05:00

113 lines
3.5 KiB
XML

<project name="deploy.esb" default="main">
<import file="deploy-web.xml" />
<target name="main">
<!-- on a developer machine, the following directories should
already exist. -->
<mkdir dir="${edex.root.directory}/lib" />
<mkdir dir="${edex.root.directory}/bin" />
<mkdir dir="${edex.root.directory}/conf" />
<antcall target="cleanup" />
<antcall target="deploy.esb" />
<if>
<equals arg1="${deploy.data}" arg2="true" />
<then>
<antcall target="deploy.esb-data" />
</then>
</if>
<if>
<equals arg1="${deploy.web}" arg2="true" />
<then>
<antcall target="deploy.esb-web" />
</then>
</if>
</target>
<target name="cleanup">
<!-- delete all files under ${esbDir}/lib/ -->
<echo message="Cleaning target directory: ${edex.root.directory}/lib/" />
<delete includeemptydirs="true">
<fileset dir="${edex.root.directory}/lib/">
<include name="**" />
<exclude name="native/**" />
</fileset>
</delete>
<!-- delete the shell scripts from ${esbDir}/bin/ -->
<echo message="Cleaning target directory: ${edex.root.directory}/bin/" />
<delete includeemptydirs="true">
<fileset dir="${edex.root.directory}/bin/">
<include name="*.sh"/>
<include name="yajsw/**" />
</fileset>
</delete>
<echo message="Cleaning target directory: ${edex.root.directory}/conf" />
<delete>
<fileset dir="${edex.root.directory}/conf">
<include name="**" />
<exclude name="**/site/**"/>
</fileset>
</delete>
</target>
<target name="deploy.esb">
<copy todir="${edex.root.directory}"
overwrite="${esb.overwrite}">
<fileset dir="${esb.directory}">
<exclude name="data/**" />
<exclude name="svcBackup/**" />
<exclude name="**/bin/setup.env" />
<exclude name="**/bin/linux-x86-32/**" />
<exclude name="**/bin/linux-x86-64/**" />
<exclude name="**/lib/lib_illusion/**" />
</fileset>
</copy>
<!-- copy the correct 'libpython.so' based on architecture. -->
<if>
<available
file="${esb.directory}/lib/lib_illusion/${architecture}"
type="dir" />
<then>
<mkdir dir="${edex.root.directory}/lib/lib_illusion" />
<copy todir="${edex.root.directory}/lib/lib_illusion">
<fileset dir="${esb.directory}/lib/lib_illusion/${architecture}">
<include name="*.so" />
</fileset>
</copy>
</then>
</if>
<!-- set executable permissions - start.sh. -->
<chmod file="${edex.root.directory}/bin/start.sh" perm="ugo+rx" />
</target>
<target name="deploy.esb-data">
<copy todir="${edex.root.directory}"
overwrite="${esb.overwrite}">
<fileset dir="${esb.directory}" includes="data/**" />
</copy>
<!-- update directory permissions. -->
<chmod dir="${edex.root.directory}/data" perm="775"
includes="**/*" type="both" />
</target>
<target name="deploy.esb-web">
<deploy.war
web.project.dir="com.raytheon.edex.uengine"
war.name="uEngineWeb" />
<deploy.war
web.project.dir="gov.noaa.nws.ncep.edex.purgeutil"
war.name="purgeWeb" />
<deploy.war
web.project.dir="com.raytheon.uf.edex.registry.ebxml"
war.name="registryEbxml" />
</target>
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${basedir}/lib/ant/ant-contrib-1.0b3.jar" />
</project>