-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
81 lines (69 loc) · 2.49 KB
/
Copy pathbuild.xml
File metadata and controls
81 lines (69 loc) · 2.49 KB
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="jar" name="Create Runnable Jar for Project timeflecks">
<!-- ANT 1.7 is required -->
<path id = "deps_classpath-test">
<pathelement path="lib/sqlite-jdbc-3.8.6.jar" />
<pathelement path="lib/junit-4.11.jar" />
<pathelement path="lib/jcalendar-1.4.jar" />
<pathelement path="lib/hamcrest-core-1.3.jar" />
</path>
<path id = "deps_classpath-notest">
<pathelement path="lib/sqlite-jdbc-3.8.6.jar" />
<pathelement path="lib/jcalendar-1.4.jar" />
</path>
<path id = "testing_classpath">
<pathelement path="bin/" />
<pathelement path="lib/sqlite-jdbc-3.8.6.jar" />
<pathelement path="lib/junit-4.11.jar" />
<pathelement path="lib/jcalendar-1.4.jar" />
<pathelement path="lib/hamcrest-core-1.3.jar" />
</path>
<property name="jarname" value="Timeflecks.jar" />
<!-- remove all build files -->
<target name="clean">
<delete dir="bin"/>
<delete file="${jarname}"/>
</target>
<!-- build all .class files, including jUnit tests -->
<target name="compile-test">
<mkdir dir="bin"/>
<javac srcdir="src" destdir="bin" includeantruntime="false">
<classpath refid="deps_classpath-test" />
</javac>
</target>
<!-- build all .class files, except jUnit tests -->
<target name="compile-notest">
<mkdir dir="bin"/>
<copy todir="bin/resources">
<fileset dir="src/resources" />
</copy>
<copy todir="bin/licenses">
<fileset dir="licenses" />
</copy>
<javac srcdir="src" destdir="bin" includeantruntime="false">
<exclude name="*/test/" />
<classpath refid="deps_classpath-notest" />
</javac>
</target>
<!-- output executable jar file -->
<target name="jar" depends="compile-notest">
<jar destfile="${jarname}" basedir="bin">
<zipgroupfileset dir="lib" includes="*.jar" excludes="junit*.jar,hamcrest*.jar" />
<manifest>
<attribute name="Main-Class" value="core.Timeflecks"/>
<attribute name="Class-Path" value="."/>
</manifest>
</jar>
</target>
<!-- run jUnit tests -->
<target name="test" depends="compile-test">
<junit printsummary="yes" fork="yes">
<classpath refid="testing_classpath" />
<batchtest fork="yes">
<fileset dir="src/">
<include name="**/test/*.java"/>
</fileset>
</batchtest>
</junit>
</target>
</project>