91 lines
3.1 KiB
XML
Executable file
91 lines
3.1 KiB
XML
Executable file
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project name="Zutil" >
|
|
|
|
<!-- ________________________ PROPERTIES AND SETTINGS ________________________ -->
|
|
|
|
<!--common properties-->
|
|
<property name="gitRoot" value="." />
|
|
<property name="srcDir" value="${gitRoot}/src" />
|
|
<property name="testDir" value="${gitRoot}/test" />
|
|
<property name="libDir" value="${gitRoot}/lib" />
|
|
<property name="buildRoot" value="${gitRoot}/build" />
|
|
<property name="buildDir" value="${buildRoot}/production" />
|
|
<property name="buildTestDir" value="${buildRoot}/test" />
|
|
<property name="releaseDir" value="${buildRoot}/release" />
|
|
<property name="reportsDir" value="${buildRoot}/reports" />
|
|
|
|
<!--define standard arduments for javac-->
|
|
<presetdef name="javac">
|
|
<javac includeantruntime="false" />
|
|
</presetdef>
|
|
|
|
<!-- ________________________ CLASSPATHS ________________________ -->
|
|
|
|
<!--classpath included when building-->
|
|
<path id="classpath.build">
|
|
<fileset dir="${libDir}">
|
|
<include name="**/*.jar"/>
|
|
</fileset>
|
|
<pathelement location="${buildDir}" />
|
|
</path>
|
|
|
|
<path id="classpath.test">
|
|
<pathelement location="${buildTestDir}" />
|
|
<!--include libraries used for building-->
|
|
<path refid="classpath.build"/>
|
|
</path>
|
|
|
|
<!-- ________________________ EXECUTION TARGETS ________________________ -->
|
|
|
|
<target name="test" depends="build-test">
|
|
<mkdir dir="${reportsDir}" />
|
|
<junit printsummary="yes" haltonfailure="false" fork="true" timeout="3000000">
|
|
<classpath refid="classpath.test" />
|
|
<formatter type="plain" usefile="false" /> <!-- to screen -->
|
|
<formatter type="xml" /> <!-- to file -->
|
|
|
|
<batchtest todir="${reportsDir}" skipNonTests="true">
|
|
<fileset dir="${buildTestDir}" includes="**/*.class" />
|
|
</batchtest>
|
|
</junit>
|
|
</target>
|
|
|
|
<!-- ________________________ BUILD TARGETS ________________________ -->
|
|
|
|
<!--clean all build paths-->
|
|
<target name="clean">
|
|
<delete includeemptydirs="true" failonerror="false">
|
|
<fileset dir="${buildRoot}" includes="**/*"/>
|
|
</delete>
|
|
</target>
|
|
|
|
<!--build product code-->
|
|
<target name="release" depends="build">
|
|
<jar destfile="${releaseDir}/Zutil.jar" basedir="${buildDir}" />
|
|
</target>
|
|
|
|
<target name="build">
|
|
<mkdir dir="${buildDir}" />
|
|
<javac target="1.7" srcdir="${srcDir}" destdir="${buildDir}" debug="yes" debugLevel="lines,vars,source">
|
|
<classpath refid="classpath.build" />
|
|
<include name="**/*.java" />
|
|
</javac>
|
|
<copy todir="${buildDir}"> <!-- Copy resource files -->
|
|
<fileset dir="${srcDir}"
|
|
excludes="**/*.java" />
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="build-test" depends="build">
|
|
<mkdir dir="${buildTestDir}" />
|
|
<javac srcdir="${testDir}" destdir="${buildTestDir}" debug="yes" debugLevel="lines,vars,source">
|
|
<classpath refid="classpath.test" />
|
|
<include name="**/*.java" />
|
|
</javac>
|
|
<copy todir="${buildTestDir}">
|
|
<fileset dir="${testDir}"
|
|
excludes="**/*.java" />
|
|
</copy>
|
|
</target>
|
|
|
|
</project>
|