-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
76 lines (65 loc) · 2.42 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
<project name="libhxl-java" default="dist" basedir=".">
<description>
Java support library for the Humanitarian Exchange Language (HXL) standard.
</description>
<property name="src.dir" location="src"/>
<property name="build.dir" location="build"/>
<property name="main.src.dir" location="${src.dir}/main/java"/>
<property name="main.build.dir" location="${build.dir}/main"/>
<property name="test.src.dir" location="${src.dir}/test/java"/>
<property name="test.resources.dir" location="${src.dir}/test/resources"/>
<property name="test.build.dir" location="${build.dir}/test"/>
<property name="dist.dir" location="dist"/>
<property name="javadoc.dir" location="doc/javadoc"/>
<path id="main.class.path">
<pathelement location="lib/opencsv-2.3.jar"/>
</path>
<path id="junit.class.path">
<pathelement location="lib/junit-4.11.jar"/>
<pathelement location="lib/hamcrest-core-1.3.jar"/>
<pathelement location="${main.build.dir}"/>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${main.build.dir}"/>
<mkdir dir="${test.build.dir}"/>
<mkdir dir="${javadoc.dir}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${main.src.dir}" destdir="${main.build.dir}" includeantruntime="false">
<classpath refid="main.class.path"/>
</javac>
</target>
<target name="dist" depends="compile">
<mkdir dir="${dist.dir}/lib"/>
<jar jarfile="${dist.dir}/lib/libhxl-${DSTAMP}.jar" basedir="${main.build.dir}"/>
</target>
<target name="compile-tests" depends="compile">
<javac srcdir="${test.src.dir}" destdir="${test.build.dir}" includeantruntime="false">
<classpath refid="junit.class.path"/>
</javac>
<copy todir="${test.build.dir}">
<fileset dir="${test.resources.dir}"/>
</copy>
</target>
<target name="test" depends="compile-tests">
<junit fork="yes">
<classpath>
<pathelement location="${test.build.dir}"/>
<path refid="main.class.path"/>
<path refid="junit.class.path"/>
</classpath>
<formatter type="plain" usefile="false"/>
<test name="org.hxlstandard.TestSuite"/>
</junit>
</target>
<target name="javadoc" depends="init">
<javadoc sourcepath="${main.src.dir}" destdir="${javadoc.dir}">
</javadoc>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${javadoc.dir}"/>
</target>
</project>