233 lines
No EOL
10 KiB
XML
233 lines
No EOL
10 KiB
XML
<project default="main" basedir=".">
|
|
<!-- import -->
|
|
<import file="${basedir}/deploy-common/deploy-init.xml" />
|
|
<import file="${basedir}/deploy-common/deploy-setup.xml" />
|
|
<import file="${basedir}/deploy-common/plugin-methods.xml" />
|
|
<import file="${basedir}/deploy-common/define_includegen.xml" />
|
|
|
|
<property name="build.product" value="edex" />
|
|
|
|
|
|
<!-- public static final -->
|
|
<path id="ant.contrib.path">
|
|
<fileset dir="/awips2/ant/lib/">
|
|
<include name="ant-contrib-*.jar" />
|
|
</fileset>
|
|
</path>
|
|
|
|
<target name="main" depends="init, setup, define_includegen">
|
|
<property name="esb.directory" value="${repo.dir}/build/deploy.edex.awips2/esb" />
|
|
<property name="site-package.directory" value="${python.root.directory}/lib/${python.version.dir}/site-packages" />
|
|
|
|
<!-- deploy esb {optionally: data, web} -->
|
|
<ant antfile="${repo.dir}/build/deploy.${build.product}.awips2/deploy/deploy-esb.xml" />
|
|
<!-- deploy esb configuration -->
|
|
<ant antfile="${repo.dir}/build/deploy.${build.product}.awips2/deploy/deploy-esb-configuration.xml" />
|
|
<!-- optionally: deploy gfesuite -->
|
|
<if>
|
|
<equals arg1="${deploy.gfesuite}" arg2="true" />
|
|
<then>
|
|
<ant antfile="${basedir}/deploy-common/deploy-gfesuite.xml" />
|
|
</then>
|
|
</if>
|
|
|
|
<!-- optionally: deploy raytheon python -->
|
|
<if>
|
|
<equals arg1="${deploy.python}" arg2="true" />
|
|
<then>
|
|
<antcall target="deploy.python" />
|
|
</then>
|
|
</if>
|
|
|
|
<!-- deploy edex plugins -->
|
|
<!-- which feature do we want to deploy? -->
|
|
<if>
|
|
<isset property="wa.enabled" />
|
|
<then>
|
|
<!--
|
|
Find the feature associated with
|
|
Work Assignments.
|
|
-->
|
|
<var name="feature.to.find" value="${wa.edex.feature}" />
|
|
</then>
|
|
<else>
|
|
<!--
|
|
Find the standard AWIPS II
|
|
Baseline feature.
|
|
-->
|
|
<var name="feature.to.find" value="${edex.feature}" />
|
|
</else>
|
|
</if>
|
|
|
|
<var name="feature" value="" />
|
|
<!--
|
|
find the feature file: we may deploy multiple features
|
|
if multiple Work Assignment directories have been
|
|
specified.
|
|
-->
|
|
<for list="${basedirectories}" param="directory" delimiter=";">
|
|
<sequential>
|
|
<if>
|
|
<available file="@{directory}/${feature.to.find}" />
|
|
<then>
|
|
<var name="feature" value="@{directory}/${feature.to.find}" />
|
|
<deploy.feature feature="${feature}" />
|
|
</then>
|
|
</if>
|
|
</sequential>
|
|
</for>
|
|
|
|
<!-- optionally: deploy site localization -->
|
|
<if>
|
|
<not>
|
|
<equals arg1="${localization.sites}" arg2="" />
|
|
</not>
|
|
<then>
|
|
<antcall target="deploy.localization" />
|
|
</then>
|
|
</if>
|
|
|
|
<!--
|
|
Search for WA-specific Non-Spring
|
|
Web Applications to deploy.
|
|
-->
|
|
<for list="${wa.specific.deploy}" param="wa" delimiter="${path.separator}">
|
|
<sequential>
|
|
<basename property="wa.name" file="@{wa}" />
|
|
<if>
|
|
<available file="${git.directory}/@{wa}/edex/deploy-${wa.name}/wa-deploy.xml" type="file" />
|
|
<then>
|
|
<ant antfile="${git.directory}/@{wa}/edex/deploy-${wa.name}/wa-deploy.xml" inheritall="true" inheritrefs="true" useNativeBasedir="true" />
|
|
</then>
|
|
</if>
|
|
</sequential>
|
|
</for>
|
|
|
|
<if>
|
|
<equals arg1="${deploy.python}" arg2="true" />
|
|
<then>
|
|
<exec executable="/bin/bash" >
|
|
<arg value="${antfile.dir}/opt/tools/update_dstypes.sh" />
|
|
<arg value="${site-package.directory}/dynamicserialize" />
|
|
</exec>
|
|
</then>
|
|
</if>
|
|
|
|
<tstamp>
|
|
<format property="TIMESTAMP_COMPLETE" pattern="d-MMM-yyyy h:mm:ss a" locale="en,US" />
|
|
</tstamp>
|
|
<echo message="Deploy Complete: ${TIMESTAMP_COMPLETE}" />
|
|
</target>
|
|
|
|
<!-- public -->
|
|
<!-- Targets specific to the developer deployment. -->
|
|
<macrodef name="deploy.feature">
|
|
<attribute name="feature" />
|
|
|
|
<sequential>
|
|
<!-- prepare to run includegen -->
|
|
<var name="includes.directory" value="${basedir}/tmp/includes" />
|
|
<if>
|
|
<available file="${includes.directory}" type="dir" />
|
|
<then>
|
|
<delete verbose="true" includeemptydirs="true">
|
|
<fileset dir="${includes.directory}" includes="*/**" />
|
|
</delete>
|
|
</then>
|
|
</if>
|
|
<mkdir dir="${includes.directory}" />
|
|
|
|
<!-- run includegen -->
|
|
<echo message="Generating deployment list for feature: ${feature}" />
|
|
<!--
|
|
TODO: need to update the includegen ant task to recognize
|
|
plugin architecture restrictions. Plugins that should only
|
|
be deployed for a 64-bit system should not be deployed for
|
|
a 32-bit system, etc.
|
|
-->
|
|
<echo message="${feature}" />
|
|
<echo message="${includes.directory}/cots.includes" />
|
|
<echo message="${includes.directory}/core.includes" />
|
|
|
|
<includegen providerfilter="${includegen.filter}" basedirectories="${basedirectories}" optionaldirectories="${optionaldirectories}" featurefile="${feature}" cotsout="${includes.directory}/cots.includes" plugsout="${includes.directory}/plugins.includes" coreout="${includes.directory}/core.includes" />
|
|
|
|
<var name="destination.directory" value="${edex.root.directory}/lib/plugins" />
|
|
<mkdir dir="${destination.directory}" />
|
|
<if>
|
|
<isset property="optionaldirectories" />
|
|
<then>
|
|
<var name="allDir" value="${basedirectories};${optionaldirectories}" />
|
|
<processPlugins includes.file="${includes.directory}/plugins.includes" plugin.type="plugins" plugin.directories="${allDir}" destination.directory="${destination.directory}" />
|
|
<processPlugins includes.file="${includes.directory}/core.includes" plugin.type="core" plugin.directories="${allDir}" destination.directory="${destination.directory}" />
|
|
</then>
|
|
<else>
|
|
<processPlugins includes.file="${includes.directory}/plugins.includes" plugin.type="plugins" plugin.directories="${basedirectories}" destination.directory="${destination.directory}" />
|
|
<processPlugins includes.file="${includes.directory}/core.includes" plugin.type="core" plugin.directories="${basedirectories}" destination.directory="${destination.directory}" />
|
|
</else>
|
|
</if>
|
|
|
|
|
|
|
|
<var name="destination.directory" value="${edex.root.directory}/lib/dependencies" />
|
|
<mkdir dir="${destination.directory}" />
|
|
<if>
|
|
<isset property="optionaldirectories" />
|
|
<then>
|
|
<var name="allDir" value="${basedirectories};${optionaldirectories}" />
|
|
<processPlugins includes.file="${includes.directory}/cots.includes" plugin.type="cots" plugin.directories="${allDir}" destination.directory="${destination.directory}" />
|
|
</then>
|
|
<else>
|
|
<processPlugins includes.file="${includes.directory}/cots.includes" plugin.type="cots" plugin.directories="${basedirectories}" destination.directory="${destination.directory}" />
|
|
</else>
|
|
</if>
|
|
|
|
<!-- cleanup the temporary directories -->
|
|
<if>
|
|
<available file="${basedir}/tmp" type="dir" />
|
|
<then>
|
|
<delete includeemptydirs="true">
|
|
<fileset dir="${basedir}" includes="tmp/**" />
|
|
</delete>
|
|
</then>
|
|
</if>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<target name="deploy.python">
|
|
<echo message="Deploying the Raytheon python site-packages." />
|
|
<deploy.python.site-package site.package="ufpy" plugin.src.dir="${awips.baseline.directory}" clean.site.package="true" />
|
|
<deploy.python.site-package site.package="dynamicserialize" plugin.src.dir="${awips.baseline.directory}" clean.site.package="true" />
|
|
<deploy.python.site-package site.package="pypies" plugin.src.dir="${awips.baseline.directory}" clean.site.package="true" />
|
|
</target>
|
|
|
|
<target name="deploy.localization">
|
|
<for list="${localization.sites}" param="site" delimiter="${path.separator}">
|
|
<sequential>
|
|
<echo message="Deploying localization for site: @{site}" />
|
|
|
|
<!-- determine which directory the localization
|
|
project should be in. -->
|
|
<var name="localization.path" value="" />
|
|
<if>
|
|
<available file="${awips.baseline.directory}/localization.@{site}" type="dir" />
|
|
<then>
|
|
<var name="localization.path" value="${awips.baseline.directory}/localization.@{site}" />
|
|
</then>
|
|
<else>
|
|
<var name="localization.path" value="${awips.baseline.directory}/${localization.directory}/localization.@{site}" />
|
|
</else>
|
|
</if>
|
|
|
|
<!-- copy the localization files. -->
|
|
<copy todir="${edex.root.directory}/data/utility" overwrite="true">
|
|
<fileset dir="${localization.path}/utility" includes="*/**" />
|
|
</copy>
|
|
</sequential>
|
|
</for>
|
|
|
|
</target>
|
|
|
|
<!-- static -->
|
|
<taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="ant.contrib.path" />
|
|
|
|
</project> |