awips2/edexOsgi/build.edex/build.xml

244 lines
8.1 KiB
XML
Raw Normal View History

<project name="Build EDEX" default="main">
<property name="uframe.eclipse"
value="/opt/uframe-eclipse" />
<property name="build.version"
value="1.0.0" />
<property name="build.os"
value="linux" />
<property name="build.ws"
value="gtk" />
<property name="build.arch"
value="x86" />
<property name="lightning"
value="false" />
<property name="pde.build.script"
value="./org.eclipse.pde.build_3.8.2.v20121114-140810/scripts/build.xml" />
<property name="eclipse.launcher.jar"
value="org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar" />
<target name="main-build" depends="clean">
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.common.base.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.base.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.cots.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.common.core.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.core.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.dataplugins.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.bufr.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.grib.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.archive.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.text.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.satellite.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.gfe.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.hydro.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.radar.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.dat.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.ncep.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.ost.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.npp.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.registry.client.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.datadelivery.client.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.registry.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.datadelivery.core.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.datadelivery.feature" />
</antcall>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.dataprovideragent.feature" />
</antcall>
<!-- SPECIAL CASE -->
<if>
<equals arg1="${lightning}" arg2="true" />
<then>
<antcall target="build">
<param name="feature"
value="com.raytheon.uf.edex.binlightning.feature" />
</antcall>
</then>
</if>
</target>
<!--
In the work assignment's edexOsgi/build.edex directory, create a file named similar to the following:
edexOsgi/build.edex/5-Data_Delivery-wa-build.properties
In the file, there should be one line such as:
wa.features=feature1,feature2
-->
<target name="wa-build" depends="main-build" description="Builds work assignment specific features after the main build">
<for param="wa.feature.list.file">
<fileset dir="${basedir}" includes="*-wa-build.properties" />
<sequential>
<var name="wa.features" unset="true" />
<property file="@{wa.feature.list.file}" />
<for list="${wa.features}" param="wa.feature">
<sequential>
<antcall target="build">
<param name="feature" value="@{wa.feature}" />
</antcall>
</sequential>
</for>
</sequential>
</for>
<antcall target="clean" />
</target>
<target name="main" depends="clean, main-build, wa-build" />
<target name="build">
<!-- Execute the eclipse pde build script. -->
<echo message="feature=${feature}" />
<java
classname="org.eclipse.core.launcher.Main"
fork="true"
failonerror="true">
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" />
<arg value="${uframe.eclipse}/plugins/${pde.build.script}" />
<arg value="-DbaseLocation=${uframe.eclipse}" />
<arg value="-Dbuilder=${basedir}/edex" />
<arg value="-DbuildDirectory=${basedir}/edex/tmp" />
<arg value="-DtopLevelElementId=${feature}" />
<arg value="-Dbase=${basedir}/edex" />
<arg value="-Dconfigs=${build.os},${build.ws},${build.arch}" />
<classpath>
<pathelement
location="${uframe.eclipse}/plugins/${eclipse.launcher.jar}" />
</classpath>
</java>
</target>
<target name="buildHybrid" depends="clean">
<echo message="feature=com.raytheon.uf.common.base.feature" />
<java
classname="org.eclipse.core.launcher.Main"
fork="true"
failonerror="true">
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" />
<arg value="${uframe.eclipse}/plugins/${pde.build.script}" />
<arg value="-DbaseLocation=${uframe.eclipse}" />
<arg value="-Dbuilder=${basedir}/edex" />
<arg value="-DbuildDirectory=${basedir}/edex/tmp" />
<arg value="-DtopLevelElementId=com.raytheon.uf.common.base.feature" />
<arg value="-Dbase=${basedir}/edex" />
<arg value="-Dconfigs=${build.os},${build.ws},${build.arch}" />
<arg value="-Dgenerate.p2.metadata=true" />
<arg value="-Dp2.metadata.repo=file:/${basedir}/edex/postBuild/awips2/cave/.repository" />
<arg value="-Dp2.artifact.repo=file:/${basedir}/edex/postBuild/awips2/cave/.repository" />
<arg value="-Dp2.publish.artifacts=true" />
<arg value="-DgenerateVersionsList=true" />
<classpath>
<pathelement
location="${uframe.eclipse}/plugins/${eclipse.launcher.jar}" />
</classpath>
</java>
<antcall target="clean" />
</target>
<target name="clean">
<if>
<available file="${basedir}/edex/includes"
type="dir" />
<then>
<delete includeemptydirs="true">
<fileset dir="${basedir}/edex"
includes ="includes/**" />
</delete>
</then>
</if>
<if>
<available file="${basedir}/edex/tmp"
type="dir" />
<then>
<delete includeemptydirs="true">
<fileset dir="${basedir}/edex"
includes ="tmp/**" />
</delete>
</then>
</if>
</target>
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${basedir}/lib/ant/ant-contrib-1.0b3.jar" />
</project>