-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
76 lines (64 loc) · 2.07 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="wordhierarchy" default="compile" basedir=".">
<property name="src" value="src" />
<property name="test.src" value="test_src" />
<!-- Load other global properties from local home directory -->
<!-- For example, it's possible to use jikes globally by setting the
build.compiler property to "jikes". -->
<property file="${user.home}/.ant-global.properties"/>
<property name="build" value="build" />
<property name="dist" value="dist" />
<property name="javadoc" value="javadoc" />
<property name="main.class" value="net.xmlizer.wordhierarchy.WordHierarchyBuilder" />
<target name="init">
<tstamp />
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
</target>
<path id="project.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<presetdef name="my.javac">
<javac includeantruntime="false" />
</presetdef>
<target name="compile" depends="init">
<my.javac srcdir="${src}:${test.src}" destdir="${build}" debug="yes">
<classpath refid="project.classpath"/>
</my.javac>
</target>
<target name="jar" depends="compile">
<jar destfile="${dist}/${ant.project.name}.jar" basedir="${build}">
<exclude name="**/*Test.class"/>
<exclude name="**/*Tests.class"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
</target>
<target name="javadoc">
<javadoc sourcepath="${src}" destdir="${javadoc}"
classpathref="project.classpath">
<package name="net.xmlizer.${ant.project.name}.*"/>
</javadoc>
</target>
<target name="junit" depends="compile">
<junit printsummary="withOutAndErr" haltonfailure="yes">
<classpath>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
<path location="${build}"/>
<path location="."/>
</classpath>
<batchtest fork="yes">
<fileset dir="${test.src}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="clean">
<delete dir="${build}"/>
</target>
</project>