-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
98 lines (84 loc) · 3.17 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="forkulator" default="jar" basedir=".">
<property name="version" value="0.1"/>
<property name="buildnumber" value="1"/>
<property name="junit.output.dir" value="junit"/>
<property name="test.home" value="test"/>
<path id="JUnit 4.libraryclasspath">
<pathelement location="lib/junit.jar"/>
<pathelement location="lib/hamcrest-core-1.3.jar"/>
</path>
<path id="commons.classpath">
<pathelement location="lib/commons-cli-1.2.jar"/>
<pathelement location="lib/commons-math3-3.6.1.jar"/>
</path>
<path id="forkulator.classpath">
<pathelement location="bin"/>
<path refid="JUnit 4.libraryclasspath"/>
</path>
<tstamp>
<format property="this_year" pattern="yyyy"/>
</tstamp>
<property name="copyright" value="Copyright © ${this_year} Brenton Walker"/>
<target name="build" description="Compile the classes">
<mkdir dir="bin"/>
<javac srcdir="src/" destdir="bin" deprecation="on" includeantruntime="false" debug="on">
<classpath>
<path refid="commons.classpath"/>
</classpath>
</javac>
</target>
<target name="jar" depends="build">
<delete file="forkulator.jar"/>
<delete file="MANIFEST.MF"/>
<manifest file="MANIFEST.MF">
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Class-Path" value="bin"/>
</manifest>
<jar destfile="forkulator.jar" basedir="bin" includes="**/**.class" manifest="MANIFEST.MF"/>
<copy file="forkulator.jar" todir="spark/lib/"/>
</target>
<target name="doc">
<exec executable="javadoc">
<arg line="-d doc" />
<arg line="-sourcepath src" />
<arg line="-windowtitle forkulator" />
<arg line="forkulator" />
</exec>
</target>
<target name="test" depends="build,forkulator.FJTaskTest" />
<target name="forkulator.FJTaskTest">
<javac srcdir="test/" destdir="bin" deprecation="on" includeantruntime="false">
<classpath>
<path refid="forkulator.classpath"/>
<path refid="commons.classpath"/>
</classpath>
</javac>
<mkdir dir="${junit.output.dir}"/>
<!-- the fork=yes here is essential, since we want the VM invoked with a different java.library.path -->
<junit fork="yes" printsummary="yes">
<formatter type="xml"/>
<classpath>
<path refid="forkulator.classpath" />
<path refid="commons.classpath"/>
<fileset dir="lib">
<include name="**/junit.jar" />
</fileset>
</classpath>
<test name="${test.entry}" todir="${junit.output.dir}" if="test.entry"/>
<batchtest todir="${junit.output.dir}" unless="test.entry">
<fileset dir="${test.home}">
<include name="**/*Test.java"/>
<exclude name="**/*AbstractTest.java"/>
</fileset>
</batchtest>
<sysproperty key="java.library.path" value="${java.library.path}:${user.dir}/lib"/>
<env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:lib" />
</junit>
</target>
<target name="clean">
<delete dir="./bin"/>
<delete dir="./junit"/>
<delete file="./forkulator.jar"/>
</target>
</project>