-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
64 lines (53 loc) · 2.06 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="CAB302-Assignment2" default="build" basedir=".">
<fail message="Ant 1.10.5+ is required!">
<condition>
<not>
<antversion atleast="1.10.5"/>
</not>
</condition>
</fail>
<path id="test.classpath">
<pathelement path="out/test"/>
<pathelement path="out/main"/>
<fileset dir="lib/ant">
<include name="**/*.jar" />
<include name="**/*.zip" />
</fileset>
</path>
<target name="build" description="clean build" depends="clean, test" />
<target name="clean">
<delete dir="out"/>
</target>
<target name="init">
<mkdir dir="out/main"/>
<mkdir dir="out/test"/>
<mkdir dir="out/test-report"/>
</target>
<target name="compile" depends="init">
<javac destdir="out/main" srcdir="src/main/java" includeantruntime="false"/>
<javac destdir="out/test" classpathref="test.classpath" srcdir="src/test/java" includeantruntime="false"/>
</target>
<target name="dist" depends="compile">
<mkdir dir="bin/dist" />
<jar destfile="bin/dist/CAB302-Assignment2.jar" basedir="out/main">
<manifest>
<attribute name="Main-Class" value="main.java.Main"/>
<attribute name="Implementation-Title" value="CAB302 Assignment 2"/>
<attribute name="Implementation-Vendor" value="BradF-99"/>
</manifest>
</jar>
</target>
<target name="test" depends="compile">
<junitlauncher haltOnFailure="true" printSummary="true">
<classpath refid="test.classpath"/>
<testclasses outputdir="out/test-report">
<fileset dir="out/test">
<include name="**/*Tests.class"/>
</fileset>
<listener type="legacy-xml" sendSysOut="true" sendSysErr="true"/>
<listener type="legacy-plain" sendSysOut="true" />
</testclasses>
</junitlauncher>
</target>
</project>