Omaha #3299 - Update buid.xml to work with nightly build and development workstation

Former-commit-id: b99479a3c6 [formerly c8d4fb79dd] [formerly ca6440c80e] [formerly b99479a3c6 [formerly c8d4fb79dd] [formerly ca6440c80e] [formerly 5685c69da3 [formerly ca6440c80e [formerly ab3ed9118dfd90ea929e450d991d882312f4a520]]]]
Former-commit-id: 5685c69da3
Former-commit-id: 875c02fa4c [formerly 3db1e79370] [formerly a59f7ca5910aa3f7ddea1d7d56a072e955d24faa [formerly 2161f229e2]]
Former-commit-id: 88135dfbc67fb24212d4274bac3e9dcf8316aa88 [formerly 04bcd53329]
Former-commit-id: e753638fcb
This commit is contained in:
Greg Armendariz 2015-02-09 14:57:22 -06:00
parent 6bbeb5802d
commit b9fb53a25f

View file

@ -23,16 +23,19 @@
]>
<project name="RCMPackageBuilder" default="deploy" basedir=".">
<property file="${basedir}/../../edexOsgi/build.edex/edex/common.properties" />
<property file="${basedir}/../../edexOsgi/build.edex/edex/common.properties" />
<condition property="ant.lib.dir" value="${basedir}/../../edexOsgi/build.edex/lib/ant/" else="${basedir}/../build.edex/lib/ant/">
<available file="${basedir}/../../edexOsgi/build.edex/lib/ant/ant-contrib-1.0b3.jar" />
</condition>
<taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${ant.lib.dir}/ant-contrib-1.0b3.jar" />
<path id="ant.classpath">
<fileset dir="${basedir}/../../edexOsgi/build.edex/lib/ant">
<fileset dir="${ant.lib.dir}">
<include name="*.jar" />
</fileset>
</fileset>
</path>
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${basedir}/../../edexOsgi/build.edex/lib/ant/ant-contrib-1.0b3.jar" />
<!--
This build script expects the following projects to exist at the same
@ -42,210 +45,227 @@
built before running this script.
-->
&substitute-targets;
<description>
Builds a deployment of the RCM for packaging
</description>
<!-- set global properties for this build -->
<property environment="user" />
<property name="src" location="src" />
<property name="build" location="build" />
<property name="deploy.dir" location="Deploy" />
<!-- set global properties for this build -->
<property environment="user" />
<property name="props.dir" location="${basedir}/properties" />
<property file="${props.dir}/build-local.properties" />
<property name="src" location="src" />
<property name="build" location="build" />
<property name="deploy.dir" location="Deploy" />
<available file="${basedir}/tmp" property="tmp.ready" />
<property name="props.dir" location="${basedir}/properties" />
<property file="${props.dir}/build-local.properties" />
<condition property="pde.not.ready">
<and>
<isset property="pde.build" />
<not>
<isset property="tmp.ready" />
</not>
</and>
</condition>
<property name="top.dir" value="${basedir}/../../.."/>
<property name="core_foss_lib.dir" value="${top.dir}/${core-foss.repo}/lib"/>
<property name="a2_foss_lib.dir" value="${top.dir}/${awips2-foss.repo}/lib"/>
<property name="core_common.dir" value="${top.dir}/${core.repo}/common/"/>
<available file="${basedir}/tmp" property="tmp.ready" />
<property name="tab" value=" "/>
<echo level="info" message=" "/>
<echo level="info" message="Deploy checks the following directories for source:"/>
<echo level="info" message=" "/>
<for list="${core.repositories}" param="repository.directory">
<sequential>
<echo level="info" message="${tab}@{repository.directory}" />
<if>
<not>
<available file="${top.dir}/@{repository.directory}" type="dir" />
</not>
<then>
<echo level="error" message="${tab}@{repository.directory} does not exist!"/>
<property name="missingDir"
value="true" />
</then>
</if>
</sequential>
</for>
<if>
<isset property="missingDir" />
<then>
<echo level="error" message=" "/>
<echo level="error" message="Edit core.repositories=${core.repositories} in common.properties, rename source directories or create a symlink!"/>
<echo level="error" message=" "/>
<fail message="Unable to locate source directories."/>
</then>
</if>
<echo level="info" message=" "/>
<property name="edexsrc.dir" value="${basedir}/../../edexOsgi"/>
<condition property="pde.not.ready">
<and>
<isset property="pde.build" />
<not>
<isset property="tmp.ready" />
</not>
</and>
</condition>
<!-- Set default EDEX install location for copy filter -->
<property name="def.edex.install.dir" value="/awips" />
<condition property="edex.home" value="$EdexBaseDir" else="${def.edex.install.dir}">
<isset property="installer"/>
</condition>
<!-- Create clean deployment -->
<target name="deploy">
<echo message="----------------------------------------------------------------"/>
<echo message=" deploying RCM to ${deploy.dir}"/>
<echo message=" PDE Build = ${pde.build}"/>
<echo message="----------------------------------------------------------------"/>
<antcall target="un.deploy" />
<antcall target="re.deploy" />
<antcall target="config.deploy" />
</target>
<condition property="top.dir" value="${basedir}/.." else="${basedir}/../../..">
<available file="${basedir}/../build.edex/lib/ant/ant-contrib-1.0b3.jar" />
</condition>
<!--
<condition property="core_foss_lib.dir" value="${basedir}/.." else="${top.dir}/${core-foss.repo}/lib">
<available file="${basedir}/../build.edex/lib/ant/ant-contrib-1.0b3.jar" />
</condition>
<condition property="a2_foss_lib.dir" value="${basedir}/.." else="${top.dir}/${awips2-foss.repo}/lib">
<available file="${basedir}/../build.edex/lib/ant/ant-contrib-1.0b3.jar" />
</condition>
<condition property="core_common.dir" value="${basedir}/.." else="${top.dir}/${core.repo}/common/">
<available file="${basedir}/../build.edex/lib/ant/ant-contrib-1.0b3.jar" />
</condition>
<!-- Only check for directories on development workstation-->
<if>
<equals arg1="${top.dir}" arg2="${basedir}/../../.." />
<then>
<property name="tab" value=" " />
<echo level="info" message=" " />
<echo level="info" message="Deploy checks the following directories for source:" />
<echo level="info" message=" " />
<for list="${core.repositories}" param="repository.directory">
<sequential>
<echo level="info" message="${tab}@{repository.directory}" />
<if>
<not>
<available file="${top.dir}/@{repository.directory}" type="dir" />
</not>
<then>
<echo level="error" message="${tab}@{repository.directory} does not exist!" />
<property name="missingDir" value="true" />
</then>
</if>
</sequential>
</for>
<if>
<isset property="missingDir" />
<then>
<echo level="error" message=" " />
<echo level="error" message="Edit core.repositories=${core.repositories} in common.properties, rename source directories or create a symlink!" />
<echo level="error" message=" " />
<fail message="Unable to locate source directories." />
</then>
</if>
<echo level="info" message=" " />
</then>
</if>
<property name="edexsrc.dir" value="${basedir}/../../edexOsgi"/>
<!-- Set default EDEX install location for copy filter -->
<property name="def.edex.install.dir" value="/awips" />
<condition property="edex.home" value="$EdexBaseDir" else="${def.edex.install.dir}">
<isset property="installer"/>
</condition>
<!-- Create clean deployment -->
<target name="deploy">
<echo message="----------------------------------------------------------------"/>
<echo message=" deploying RCM to ${deploy.dir}"/>
<echo message=" PDE Build = ${pde.build}"/>
<echo message="----------------------------------------------------------------"/>
<antcall target="un.deploy" />
<antcall target="re.deploy" />
<antcall target="config.deploy" />
</target>
<!--
Deploy on top of existing deployment. Old files not removed nor is the
configuration file changed.
-->
<target name="re.deploy">
<mkdir dir="${deploy.dir}" />
<mkdir dir="${deploy.dir}/bin" />
<mkdir dir="${deploy.dir}/lib" />
<mkdir dir="${deploy.dir}/data" />
<!-- copy with filter -->
<copy todir="${deploy.dir}" verbose="false">
<filterset refid="installer.filter.set" />
<fileset dir="bits">
<include name="bin/*" />
</fileset>
</copy>
<chmod perm="a-w,a+x">
<fileset dir="${deploy.dir}/bin">
<include name="*" />
</fileset>
</chmod>
<mkdir dir="${deploy.dir}" />
<mkdir dir="${deploy.dir}/bin" />
<mkdir dir="${deploy.dir}/lib" />
<mkdir dir="${deploy.dir}/data" />
<!-- copy with filter -->
<copy todir="${deploy.dir}" verbose="false">
<filterset refid="installer.filter.set" />
<fileset dir="bits">
<include name="bin/*" />
</fileset>
</copy>
<chmod perm="a-w,a+x">
<fileset dir="${deploy.dir}/bin">
<include name="*" />
</fileset>
</chmod>
<!--
<!--
Not all of these files should be made executable. Need to know all
executable names... or all non-executables...
-->
<copy todir="${deploy.dir}/bin" verbose="false">
<fileset dir="../com.raytheon.rcm.tools/src">
<include name="*.py" />
</fileset>
</copy>
<chmod perm="a+x">
<fileset dir="${deploy.dir}/bin">
<include name="*.py" />
<exclude name="stomp.py" />
</fileset>
</chmod>
<chmod perm="a-w">
<fileset dir="${deploy.dir}/bin">
<include name="*.py" />
</fileset>
</chmod>
<copy todir="${deploy.dir}/bin" verbose="false">
<fileset dir="../com.raytheon.rcm.tools/src">
<include name="*.py" />
</fileset>
</copy>
<chmod perm="a+x">
<fileset dir="${deploy.dir}/bin">
<include name="*.py" />
<exclude name="stomp.py" />
</fileset>
</chmod>
<chmod perm="a-w">
<fileset dir="${deploy.dir}/bin">
<include name="*.py" />
</fileset>
</chmod>
<copy todir="${deploy.dir}/lib" flatten="true">
<fileset dir="${core_foss_lib.dir}/org.apache.activemq" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.apache.qpid" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.slf4j" includes="**/*.jar">
<include name="**/jcl-over-slf4j*.jar" />
<include name="**/jul-to-slf4j*.jar" />
<include name="**/slf4j-api*.jar" />
</fileset>
<fileset dir="${core_foss_lib.dir}/org.apache.commons.beanutils" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.apache.commons.codec" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.apache.commons.collections" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.apache.commons.lang" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/ch.qos.logback" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/javax.jms" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.springframework">
<include name="**/*spring*beans*.jar" />
<include name="**/*spring*context*.jar" />
</fileset>
<fileset dir="${a2_foss_lib.dir}/org.itadaki.bzip2" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.quartz" includes="**/*.jar" />
</copy>
<copy todir="${deploy.dir}/lib" flatten="true">
<fileset dir="${core_foss_lib.dir}/org.apache.activemq" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.apache.qpid" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.slf4j" includes="**/*.jar">
<include name="**/jcl-over-slf4j*.jar" />
<include name="**/jul-to-slf4j*.jar" />
<include name="**/slf4j-api*.jar" />
</fileset>
<fileset dir="${core_foss_lib.dir}/org.apache.commons.beanutils" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.apache.commons.codec" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.apache.commons.collections" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.apache.commons.lang" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/ch.qos.logback" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/javax.jms" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.springframework">
<include name="**/*spring*beans*.jar" />
<include name="**/*spring*context*.jar" />
</fileset>
<fileset dir="${a2_foss_lib.dir}/org.itadaki.bzip2" includes="**/*.jar" />
<fileset dir="${core_foss_lib.dir}/org.quartz" includes="**/*.jar" />
</copy>
<delete dir="bin" />
<mkdir dir="bin" />
<antcall target="local.jar" />
<antcall target="pde.jar" />
<jar destfile="${deploy.dir}/lib/radarserver-mq.jar" basedir="bin" />
<delete dir="bin" />
</target>
<delete dir="bin" />
<mkdir dir="bin" />
<antcall target="local.jar" />
<antcall target="pde.jar" />
<jar destfile="${deploy.dir}/lib/radarserver-mq.jar" basedir="bin" />
<delete dir="bin" />
</target>
<target name="local.jar" if="pde.build">
<copy toDir="bin">
<fileset dir="tmp/plugins/com.raytheon.rcm.lib/@dot"
<target name="local.jar" if="pde.build">
<copy toDir="bin">
<fileset dir="tmp/plugins/com.raytheon.rcm.lib/@dot"
includes="**/*.class" />
<fileset dir="tmp/plugins/com.raytheon.rcm.lib/@dot"
<fileset dir="tmp/plugins/com.raytheon.rcm.lib/@dot"
includes="**/*.txt" />
<fileset dir="tmp/plugins/com.raytheon.rcm.server/@dot"
<fileset dir="tmp/plugins/com.raytheon.rcm.server/@dot"
includes="**/*.class" />
<fileset dir="tmp/plugins/com.raytheon.rcm.server.mq/@dot"
<fileset dir="tmp/plugins/com.raytheon.rcm.server.mq/@dot"
includes="**/*.class" />
<fileset dir="tmp/plugins/com.raytheon.rcm.server.mq/@dot"
<fileset dir="tmp/plugins/com.raytheon.rcm.server.mq/@dot"
includes="**/*.txt" />
<fileset dir="tmp/plugins/com.raytheon.uf.common.util/@dot"
<fileset dir="tmp/plugins/com.raytheon.uf.common.util/@dot"
includes="**/*.class" />
</copy>
</target>
</copy>
</target>
<target name="pde.jar" unless="pde.build">
<copy todir="bin">
<fileset dir="../com.raytheon.rcm.lib/bin" includes="**/*.class" />
<fileset dir="../com.raytheon.rcm.lib/bin" includes="**/*.txt" />
<fileset dir="../com.raytheon.rcm.server/bin" includes="**/*.class" />
<fileset dir="../com.raytheon.rcm.server.mq/bin" includes="**/*.class" />
<fileset dir="../com.raytheon.rcm.server.mq/bin" includes="**/*.txt" />
<fileset dir="${core_common.dir}/com.raytheon.uf.common.util/bin" includes="**/*.class" />
</copy>
</target>
<target name="pde.jar" unless="pde.build">
<copy todir="bin">
<fileset dir="../com.raytheon.rcm.lib/bin" includes="**/*.class" />
<fileset dir="../com.raytheon.rcm.lib/bin" includes="**/*.txt" />
<fileset dir="../com.raytheon.rcm.server/bin" includes="**/*.class" />
<fileset dir="../com.raytheon.rcm.server.mq/bin" includes="**/*.class" />
<fileset dir="../com.raytheon.rcm.server.mq/bin" includes="**/*.txt" />
<fileset dir="${core_common.dir}/com.raytheon.uf.common.util/bin" includes="**/*.class" />
</copy>
</target>
<target name="config.deploy">
<copy todir="${deploy.dir}" verbose="false">
<filterset refid="installer.filter.set" />
<fileset dir="cfgbits">
<include name="**/*" />
<exclude name="**/config.xml"/>
</fileset>
</copy>
<!-- this is required because config.xml contains an '@' in a url -->
<copy todir="${deploy.dir}" verbose="false">
<filterset refid="config.xml.filter.set"/>
<fileset dir="cfgbits">
<include name="**/config.xml"/>
</fileset>
</copy>
</target>
<target name="config.deploy">
<copy todir="${deploy.dir}" verbose="false">
<filterset refid="installer.filter.set" />
<fileset dir="cfgbits">
<include name="**/*" />
<exclude name="**/config.xml"/>
</fileset>
</copy>
<!-- this is required because config.xml contains an '@' in a url -->
<copy todir="${deploy.dir}" verbose="false">
<filterset refid="config.xml.filter.set"/>
<fileset dir="cfgbits">
<include name="**/config.xml"/>
</fileset>
</copy>
</target>
<target name="un.deploy">
<delete dir="${deploy.dir}"></delete>
</target>
<target name="un.deploy">
<delete dir="${deploy.dir}">
</delete>
</target>
</project>