<project name="MyWebApplication" basedir="." default="coop" >
<!--
-
- SETUP ENVIRONMENT VARIABLES FOR THE BUILD
-
-->
<property file="build_ODC.properties"/>
<property name="build" value="${build.dir}"/>
<property name="deploy" value="${dest.dir}"/>
<property name="compile.debug" value="true"/>
<property name="version.num" value="1.00"/>
<buildnumber file="build.num"/>
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<manifest file="MANIFEST.MF">
<!--<attribute name="Main-Class" value="${Main-Class}"/> if any main class needs to be defined-->
<attribute name="Implementation-Title" value="${coop.package.name} (${coop.repository})" />
<attribute name="Implementation-Version"
value="${version.num}-b${build.number}"/>
<attribute name="Built-Date" value="${TODAY}"/>
</manifest>
<!--
-
- SETUP INCLUDE CLASSES; THIS IS WHERE WE WILL DEFINE WHAT CLASSES WILL
- BE INCLUDED IN EACH OF OUR JAR FILES
-
-->
<!--
-
- DEFINE OUR CLASSPATH
-
-->
<path id="build.class.path">
<fileset dir="${lib.shared.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<!--
-
- BUILD OPTIONS: ejb.jar, ejb.jar.clean
-
-->
<!-- ===================================== -->
<!-- Build the EJB JAR file -->
<!-- ===================================== -->
<target name="coop" depends="compile">
<jar jarfile="${package.file.jar}" manifest="MANIFEST.MF" update="true" >
<fileset dir="${build.dir}"
includes="**/*"/>
<fileset dir="${workingdir}/META-INF"
includes="${workingdir}/META-INF/**/*" />
</jar>
</target>
<target name="coop.clean" depends="compile.clean,coop" />
<!--
-
- COMPILATION OPTIONS: compile, compile.clean
-
-->
<!-- ===================================== -->
<!-- Compile -->
<!-- ===================================== -->
<!--
Compilation Step: Compiles all of the files defined in the src property
-->
<target name="compile" depends="prepare">
<!-- Compile the java code from ${src.dir} into ${build.dir} -->
<echo message="Compiling source code..." />
<javac srcdir="${workingdir}"
destdir="${build.dir}" includes="**/*" debug="${compile.debug}">
<classpath refid="build.class.path" />
</javac>
<copy todir="${build.dir}/META-INF">
<fileset dir="${workingdir}/META-INF">
<include name="**/*.xml"/>
</fileset>
</copy>
</target>
<!--
Perform a clean compilation
-->
<target name="compile.clean" depends="clean,prepare,compile" />
<!--
-
- SETUP OPTIONS: clean, prepare
-
-->
<!--
Prepare performs setup steps for the build
-->
<target name="prepare" depends="clean">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build.dir}" />
<mkdir dir="${dest.dir}" />
<mkdir dir="${build.dir}/META-INF"/>
</target>
<!--
Clean everything
-->
<target name="clean">
<!-- Delete the ${build.dir} and ${jar.dir} directory trees -->
<delete dir="${build.dir}" />
<delete dir="${dest.dir}" />
<delete dir="${build.dir}/META-INF"/>
</target>
</project>