-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
109 lines (94 loc) · 3.7 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
98
99
100
101
102
103
104
105
106
107
108
109
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse.ant.import?>
<project basedir="." default="build" name="edu.washington.cse.se.crystal">
<property environment="env"/>
<property name="junit.output.dir" value="junit"/>
<property name="jar.dir" value="builds"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<!-- configuration for one-jar -->
<property name="one-jar.dist.dir" value="lib-exc"/>
<import file="${one-jar.dist.dir}/one-jar-ant-task.xml" optional="true" />
<path id="edu.washington.cse.se.crystal.classpath">
<pathelement location="bin"/>
<fileset file="lib/*.jar" />
</path>
<target name="init">
<mkdir dir="bin"/>
<tstamp/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy includeemptydirs="false" todir="bin">
<fileset dir="test-src">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
<delete file="${jar.dir}/crystal_${DSTAMP}.jar"/>
<delete file="${jar.dir}/crystal_latest.jar"/>
</target>
<target depends="build-project" name="build"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}" includeantruntime="false">
<src path="src"/>
<classpath refid="edu.washington.cse.se.crystal.classpath"/>
</javac>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}" includeantruntime="false">
<src path="test-src"/>
<classpath refid="edu.washington.cse.se.crystal.classpath"/>
</javac>
</target>
<target name="jar" depends="clean,build">
<mkdir dir="${jar.dir}"/>
<one-jar destfile="${jar.dir}/crystal_${DSTAMP}.jar">
<manifest>
<attribute name="One-Jar-Main-Class" value="crystal.client.ConflictSystemTray"/>
</manifest>
<main>
<fileset dir="bin"/>
</main>
<lib>
<fileset file="lib/*.jar" />
</lib>
</one-jar>
<copy file="${jar.dir}/crystal_${DSTAMP}.jar" tofile="${jar.dir}/crystal_latest.jar"/>
<echo>
${jar.dir}/crystal_latest.jar built.
</echo>
</target>
<target name="crystal">
<java classname="crystal.client.ConflictSystemTray" failonerror="true" fork="yes">
<classpath refid="edu.washington.cse.se.crystal.classpath"/>
</java>
</target>
<target name="test" depends="clean,build">
<mkdir dir="${junit.output.dir}"/>
<junit fork="yes" printsummary="withOutAndErr">
<formatter type="xml"/>
<batchtest fork="yes" todir="${junit.output.dir}">
<fileset dir="test-src">
<include name="**/*Test*.java"/>
<exclude name="**/AllTests.java"/>
</fileset>
</batchtest>
<classpath refid="edu.washington.cse.se.crystal.classpath"/>
</junit>
</target>
<target name="junitreport">
<junitreport todir="${junit.output.dir}">
<fileset dir="${junit.output.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${junit.output.dir}"/>
</junitreport>
</target>
</project>