-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
101 lines (90 loc) · 3.52 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
<?xml version="1.0" encoding="utf-8"?>
<project name="InPUTspec" default="test">
<property name="main" location="${basedir}/main" />
<property name="test" location="${basedir}/test" />
<property name="main.doc" location="${main}/doc" />
<property name="main.src" location="${main}/src" />
<property name="test.src" location="${test}/src" />
<property name="main.bin" location="${main}/bin" />
<property name="test.bin" location="${test}/bin" />
<property name="main.lib" location="${main}/lib" />
<property name="input4j" location="${basedir}/../InPUT4j" />
<property name="input4j.lib" location="${input4j}/lib" />
<property name="input4j.bin" location="${input4j}/bin" />
<property name="debug" value="true" />
<path id="main.compile.classpath">
<fileset dir="${input4j.lib}">
<include name="*.jar" />
</fileset>
<fileset dir="${main.lib}">
<include name="*.jar" />
</fileset>
<pathelement location="${input4j.bin}" />
</path>
<path id="test.compile.classpath">
<path refid="main.compile.classpath" />
<pathelement location="${main.bin}" />
</path>
<path id="test.classpath">
<path refid="test.compile.classpath" />
<pathelement location="${test.bin}" />
</path>
<target name="clean" description="Remove output directories">
<delete dir="${main.bin}" />
<delete dir="${test.bin}" />
</target>
<target name="init" description="Create output directories">
<mkdir dir="${main.bin}" />
<mkdir dir="${test.bin}" />
</target>
<target name="compile" depends="init" description="Compile main project">
<javac
srcdir="${main.src}"
destdir="${main.bin}"
debug="${debug}"
includeAntRuntime="no">
<classpath refid="main.compile.classpath" />
</javac>
</target>
<target name="compile_test" depends="compile" description="Compile tests">
<javac
srcdir="${test.src}"
destdir="${test.bin}"
debug="${debug}"
includeAntRuntime="no">
<classpath refid="test.compile.classpath" />
</javac>
</target>
<!-- Run all unit tests, unless a specific test case is requested. -->
<target name="test" depends="compile_test" description="Run unit tests">
<property name="tests.unit" value="net.finkn.inputspec.tools.Tests" />
<junit printsummary="no" haltonerror="yes" haltonfailure="yes" fork="no">
<formatter type="brief" usefile="false" />
<classpath refid="test.classpath" />
<test name="${testcase}" if="testcase" />
<test name="${tests.unit}" unless="testcase" />
</junit>
</target>
<!-- Run all specification tests, unless a specific test is requested. -->
<target name="spec" depends="test" description="Run specification tests">
<property name="spec.v050" value="net.finkn.inputspec.v050.Spec" />
<junit printsummary="no" haltonerror="yes" haltonfailure="yes" fork="no">
<formatter type="brief" usefile="false" />
<classpath refid="test.classpath" />
<test name="${spectest}" if="spectest" />
<test name="${spec.v050}" unless="spectest" />
</junit>
</target>
<target name="doc" description="Generate javadoc documentation">
<delete dir="${main.doc}" />
<javadoc destdir="${main.doc}" failonerror="true"
Windowtitle="InPUTspec Documentation"
Doctitle="InPUTspec Documentation" >
<arg line="-quiet" />
<classpath refid="main.compile.classpath" />
<fileset dir="${main.src}">
<include name="**/*.java" />
</fileset>
</javadoc>
</target>
</project>