-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
97 lines (84 loc) · 2.89 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
92
93
94
95
96
97
<?xml version="1.0"?>
<project name="PHS Algorithms Game Project" default="test" basedir=".">
<description>Skeletal project for student implementations</description>
<property file="build.properties"/>
<property name="main.src" location="src"/>
<property name="main.build" location="build/main"/>
<property name="test.src" location="test"/>
<property name="test.build" location="build/test"/>
<path id="main.class.path">
<pathelement location="lib/mina-core-2.0.1.jar"/>
<pathelement location="lib/slf4j-api-1.6.1.jar"/>
<pathelement location="lib/slf4j-jdk14-1.6.1.jar"/>
</path>
<path id="test.class.path">
<path refid="main.class.path"/>
<pathelement location="${main.build}"/>
<pathelement location="lib/junit-4.8.2.jar"/>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${main.build}"/>
<mkdir dir="${test.build}"/>
</target>
<target name="build-main" depends="init">
<javac srcdir="${main.src}" destdir="${main.build}" debug="on">
<classpath refid="main.class.path"/>
</javac>
</target>
<target name="build-test" depends="build-main">
<javac srcdir="${test.src}" destdir="${test.build}" debug="on">
<classpath refid="test.class.path"/>
</javac>
</target>
<target name="evaluate" depends="build-main">
<java classname="net.volus.ronwalf.phs2010.games.evaluation.Evaluate"
fork="yes" failonerror="true">
<classpath refid="test.class.path"/>
<syspropertyset>
<propertyref prefix="games.evaluate"/>
</syspropertyset>
</java>
</target>
<target name="reversi" depends="build-main">
<java classname="net.volus.ronwalf.phs2010.games.gui.ReversiGui"
fork="yes" failonerror="true">
<classpath refid="test.class.path"/>
</java>
</target>
<target name="test" depends="build-test">
<junit fork="yes" haltonfailure="false" dir="."
failureproperty="test.failure"
showoutput="true"
printsummary="withOutAndErr">
<formatter type="plain"/>
<classpath refid="test.class.path"/>
<classpath path="${test.build}"/>
<batchtest>
<fileset dir="${test.build}">
<include name="**/Test*.class"/>
</fileset>
</batchtest>
</junit>
<fail if="test.failure" message="JUnit test failure."/>
</target>
<target name="zip">
<zip destfile="phs-2010-games.zip">
<zipfileset dir="." prefix="phs-2010-games">
<include name="build.xml"/>
<include name="server.xml"/>
<include name="README"/>
<include name="LICENSE"/>
<include name=".classpath"/>
<include name=".project"/>
<include name=".settings/**"/>
<include name="**/*.java"/>
<include name="lib/**"/>
</zipfileset>
</zip>
</target>
<target name="clean">
<delete dir="${main.build}"/>
<delete dir="${test.build}"/>
</target>
</project>