Added ANT file for jenkins
This commit is contained in:
parent
c528f81fd5
commit
b5b38f9128
12 changed files with 96 additions and 13 deletions
82
build.xml
Executable file
82
build.xml
Executable file
|
|
@ -0,0 +1,82 @@
|
|||
<?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}" />
|
||||
<path refid="classpath.build"/>
|
||||
</path>
|
||||
|
||||
<!-- ________________________ EXECUTION TARGETS ________________________ -->
|
||||
|
||||
<target name="test" depends="build-test">
|
||||
<mkdir dir="${reportsDir}" />
|
||||
<junit printsummary="yes" haltonfailure="false">
|
||||
<classpath refid="classpath.test" />
|
||||
<formatter type="xml" /> <!-- to file -->
|
||||
|
||||
<batchtest todir="${reportsDir}">
|
||||
<fileset dir="${buildTestDir}" includes="**/*Test*.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 srcdir="${srcDir}" destdir="${buildDir}" debug="yes" debugLevel="lines,vars,source">
|
||||
<classpath refid="classpath.build" />
|
||||
<include name="**/*.java" />
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="build-test" depends="build">
|
||||
<mkdir dir="${buildTestDir}" />
|
||||
<javac srcdir="${testDir}" destdir="${buildTestDir}" debug="yes" debugLevel="lines,vars,source">
|
||||
<classpath refid="classpath.build" />
|
||||
<classpath refid="classpath.test" />
|
||||
<include name="**/*.java" />
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue