-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.xml
67 lines (53 loc) · 1.95 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0" encoding="UTF-8"?>
<project name="CI-example" default="helloWorld" basedir=".">
<!-- Folders Properties -->
<property name="sourceFolder" value="src"/>
<property name="destFolder" value="bin"/>
<property name="libsFolder" value="libs"/>
<property name="testSourceFolder" value="test"/>
<property name="testSuiteFolder" value="testSuite"/>
<property name="testResultsFolder" value="${testSuiteFolder}/testResults"/>
<property name="testBinFolder" value="${testSuiteFolder}/testBin"/>
<!-- jUnit Jar Properties -->
<property name="jUnitJar" value="${libsFolder}\junit.jar"/>
<property name="jUnitHamcrestJar" value="${libsFolder}\org.hamcrest.core_1.3.0.v201303031735.jar"/>
<target name="helloWorld">
<echo>CI example hello world</echo>
</target>
<target name="clean">
<delete dir="${destFolder}"/>
<delete dir="${testSuiteFolder}"/>
<delete dir="${javaDocsFolder}"/>
<mkdir dir="${destFolder}"/>
<mkdir dir="${testBinFolder}"/>
<mkdir dir="${testResultsFolder}"/>
</target>
<target name="compile" depends="clean">
<javac srcdir="${sourceFolder}"
destdir="${destFolder}"
includeantruntime="No"
classpath="${jUnitJar};${jUnitHamcrestJar};${destFolder}"
/>
</target>
<target name="compileTests" depends="compile">
<javac srcdir="${testSourceFolder}"
destdir="${testBinFolder}"
includeantruntime="No"
classpath="${jUnitJar};${jUnitHamcrestJar};${destFolder}"
/>
</target>
<target name="runTests" depends="compileTests">
<junit printsummary="on" haltonfailure="false">
<batchtest fork="yes" todir="${testResultsFolder}">
<fileset dir="${testBinFolder}" includes="**/*TestCase.class"/>
<formatter type="xml"/>
</batchtest>
<classpath>
<pathelement location="${jUnitJar}"/>
<pathelement location="${jUnitHamcrestJar}"/>
<pathelement location="${testBinFolder}"/>
<pathelement location="${destFolder}"/>
</classpath>
</junit>
</target>
</project>