-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
84 lines (56 loc) · 2.34 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
<project name="correlative" default="run" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Responding to some MH ideas.
</description>
<property name="main.class.name"
value="net.peierls.example.correlation.Correlation" />
<property name="build.dir" location="${basedir}/build" />
<property name="classes.dir" location="${build.dir}/classes" />
<property name="lib.dir" location="${basedir}/lib" />
<property name="src.dir" location="${basedir}/src/main/java" />
<path id="compile.classpath">
<fileset dir="${lib.dir}" includes="*.jar" />
</path>
<path id="runtime.classpath">
<path refid="compile.classpath" />
<path location="${classes.dir}" />
</path>
<!-- Only need this for resolve target. -->
<property name="ivy.jar"
location="${user.home}/.ivy2/jars/ivy-2.4.0.jar" />
<target name="resolve">
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant"
classpath="${ivy.jar}" />
<ivy:retrieve pattern="${lib.dir}/[artifact].[ext]"
type="jar, bundle"
sync="true" />
</target>
<target name="compile"
description="Compile the Java sources" >
<mkdir dir="${classes.dir}" />
<mkdir dir="${lib.dir}" />
<javac srcdir="${src.dir}"
destdir="${classes.dir}"
classpathref="compile.classpath"
includeAntRuntime="false" >
<compilerarg value="-Xlint:deprecation" />
<compilerarg value="-Xlint:unchecked" />
<exclude name="**/package-info.java" />
</javac>
</target>
<target name="run" depends="compile"
description="Compile and run the project" >
<java classpathref="runtime.classpath"
classname="${main.class.name}"
fork="true" >
<assertions>
<enable />
</assertions>
</java>
</target>
<target name="clean"
description="Clean up build files" >
<delete dir="${build.dir}" />
</target>
</project>