-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
79 lines (68 loc) · 2.36 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
<project name="BuccaneerBuild" default="main" basedir=".">
<description>
Ant build for Buccaneer Project
</description>
<property name="src" location="src/buccaneer"/>
<property name="build" location="bin"/>
<property name="dist" location="dist"/>
<property name="docs" location="docs" />
<property name="test" location="src/test"/>
<property name="junit" location="lib/junit.jar"/>
<property name="opencsv" location="lib/opencsv-3.9.jar"/>
<path id="classpath.test">
<pathelement location="${junit}" />
<pathelement location="${opencsv}"/>
<pathelement location="${test}" />
<pathelement location="${src}/"/>
<pathelement location="${build}/"/>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${build}/test"/>
<mkdir dir="${build}/main"/>
<mkdir dir="${docs}"/>
</target>
<target name="compile" depends="init" description="compile">
<copy todir="${build}/">
<fileset dir="res">
<exclude name="**/*.java"/>
</fileset>
</copy>
<javac srcdir="${src}" destdir="${build}/">
<classpath>
<pathelement location="${opencsv}"/>
</classpath>
</javac>
<javac srcdir="${test}" destdir="${build}/">
<classpath>
<pathelement location="${junit}"/>
</classpath>
</javac>
</target>
<target name="dist" depends="compile">
<mkdir dir="${dist}/lib"/>
<jar jarfile="${dist}/builds/Build-${DSTAMP}.jar" basedir="${build}"/>
</target>
<target name="test" depends="compile">
<junit fork="yes" haltonfailure="true">
<classpath refid="classpath.test" />
<batchtest fork="yes" todir="tres">
<formatter type="brief" usefile="false"/>
<fileset dir="${test}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
<!-- Generate javadocs for current project into ${doc.dir} -->
<target name="doc" depends="init" description="generate documentation">
<javadoc sourcepath="src" destdir="${docs}"/>
</target>
<target name="clean" description="clean up" >
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="main" depends="init, compile, dist, test, doc" description="builds tests and docs">
</target>
</project>