-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
58 lines (50 loc) · 1.75 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
<project name="GCBench" default="dist" basedir=".">
<description>
Build file for the GCBench multi-threaded Java benchmark
</description>
<property name="src.dir" location="src"/>
<property name="build.dir" location="build"/>
<property name="dist.dir" location="dist"/>
<property name="lib.dir" location="lib"/>
<property name="main.class" value="GCBenchMT"/>
<path id="libs">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build.dir}"/>
</target>
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from src into build -->
<javac srcdir="${src.dir}" destdir="${build.dir}" debug="true">
<classpath refid="libs"/>
</javac>
</target>
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist.dir}"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist.dir}/gcbench-${DSTAMP}.jar" basedir="${build.dir}">
<!-- package Apache CLI into uberjar -->
<zipgroupfileset dir="lib" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete>
<fileset defaultexcludes="no" dir="." includes="**/*~"/>
</delete>
</target>
</project>