-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
91 lines (74 loc) · 2.62 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0"?>
<project name="RoboMoves" default="main" basedir=".">
<property name="src.dir" location="src" />
<property name="build.dir" location="bin" />
<property name="dist.dir" location="dist" />
<property name="docs.dir" location="docs" />
<property name="lib.dir" location="lib" />
<property name="test.dir" location="tests" />
<property name="test.report.dir" location="testreport" />
<path id="junit.class.path">
<pathelement location="lib/junit.jar" />
<pathelement location="lib/hamcrest.core.jar" />
<pathelement location="${build.dir}" />
</path>
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${docs.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${test.report.dir}" />
</target>
<target name="makedir">
<mkdir dir="${build.dir}" />
<mkdir dir="${docs.dir}" />
<mkdir dir="${dist.dir}" />
<mkdir dir="${test.report.dir}" />
</target>
<target name="compile" depends="clean, makedir">
<javac srcdir="${src.dir}" destdir="${build.dir}">
</javac>
</target>
<target name="junit-compile" depends="compile">
<javac srcdir="${test.dir}" destdir="${build.dir}">
<classpath refid="junit.class.path" />
</javac>
</target>
<target name="docs" depends="compile">
<javadoc packagenames="src" sourcepath="${src.dir}" destdir="${docs.dir}">
<fileset dir="${src.dir}">
<include name="**" />
</fileset>
</javadoc>
</target>
<target name="jar" depends="compile">
<jar destfile="${dist.dir}\RoboMoves.jar" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="com.anz.prep.robomove.RoboMoveTest" />
</manifest>
</jar>
</target>
<target name="junit" depends="junit-compile">
<junit printsummary="on" fork="true" haltonfailure="yes">
<classpath refid="junit.class.path" />
<formatter type="xml" />
<batchtest todir="${test.report.dir}">
<fileset dir="${test.dir}">
<include name="**/*Test*.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="run" depends="compile">
<path id="runtime.path">
<fileset dir="${lib.dir}" includes="*.jar"/>
</path>
<echo message = "Building and running the program..."/>
<java classname="com.anz.prep.robomove.RoboMoveTest" fork="false" classpathref="runtime.path">
<arg value="${outputdir.property}"/>
<arg value="${inputdir.property}"/>
</java>
</target>
<target name="main" depends="compile, jar, docs">
<description>Main target</description>
</target>
</project>