/
build.xml
110 lines (98 loc) · 4.23 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
110
<project name="kcoresim" default="compile">
<property file="${user.home}/.ant.global.properties"/>
<property file="build.properties"/>
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="multigraph.dir" value="../MultiGraph"/>
<property name="agarnet.dir" value="../agarnet"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="tests.dir" value="${build.dir}/tests"/>
<property name="multigraph.jar" value="${multigraph.dir}/${jar.dir}/MultiGraph.jar"/>
<property name="agarnet.jar" value="${agarnet.dir}/${jar.dir}/agarnet.jar"/>
<property name="getopt.jar" value="lib/gnu-getopt.jar"/>
<path id="project.class.path">
<pathelement location="${multigraph.jar}"/>
<pathelement location="${agarnet.jar}"/>
<pathelement location="${getopt.jar}"/>
</path>
<target name="clean" description="Clean built files">
<delete dir="build"/>
</target>
<target name="compile" description="Compile ${ant.project.name}">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" source="1.7"
debug="${compile.debug}" debuglevel="${compile.debug.level}"
fork="${compile.fork}">
<compilerarg compiler="modern" value="-Xlint"/>
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="jar" depends="compile" description="Build JAR file">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/${ant.project.name}.jar"
basedir="${classes.dir}">
<manifest>
<attribute name="Main-Class" value="kcoresim.kcoresim"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar"
description="Run, with args set from the runtime.args property">
<java classname="${ant.project.name}.${ant.project.name}"
fork="true">
<jvmarg line="${runtime.jvmargs}"/>
<arg line="${runtime.args}"/>
<classpath>
<path refid="project.class.path"/>
<pathelement location="${jar.dir}/${ant.project.name}.jar"/>
</classpath>
</java>
</target>
<target name="debug" depends="jar"
description="Debug, with args set from the runtime.args property">
<java classname="${ant.project.name}.${ant.project.name}"
fork="true">
<jvmarg line="${runtime.jvmargs}"/>
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
<arg line="${runtime.args}"/>
<classpath>
<path refid="project.class.path"/>
<pathelement location="${jar.dir}/${ant.project.name}.jar"/>
</classpath>
</java>
</target>
<target name="profile" depends="jar" description="Profile Project">
<fail unless="netbeans.home">
This target can only run inside theNetBeans IDE.</fail>
<nbprofiledirect>
<classpath><path refid="project.class.path"/> </classpath>
</nbprofiledirect>
<java classname="${ant.project.name}.${ant.project.name}"
fork="true">
<jvmarg line="${profiler.info.jvmargs.agent}"/>
<arg line="${runtime.args}"/>
<classpath>
<path refid="project.class.path"/>
<pathelement location="${jar.dir}/${ant.project.name}.jar"/>
</classpath>
</java>
</target>
<target name="profile-single" depends="jar" description="Profile Project">
<fail unless="netbeans.home">
This target can only run inside theNetBeans IDE.</fail>
<nbprofiledirect>
<classpath><path refid="project.class.path"/> </classpath>
</nbprofiledirect>
<java classname="${profile.class}"
fork="true">
<jvmarg line="${profiler.info.jvmargs.agent}"/>
<arg line="${runtime.args}"/>
<classpath>
<path refid="project.class.path"/>
<pathelement location="${jar.dir}/${ant.project.name}.jar"/>
</classpath>
</java>
</target>
</project>