-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
106 lines (98 loc) · 3.87 KB
/
build.xml
File metadata and controls
106 lines (98 loc) · 3.87 KB
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
102
103
104
105
106
<?xml version="1.0"?>
<project name="java-junit-template-project" default="test" basedir=".">
<property name="main.build.dir" value="build/main" />
<property name="main.src.dir" value="src" />
<property name="test.build.dir" value="build/test" />
<property name="test.src.dir" value="test" />
<property name="doc.dir" value="doc" />
<property name="uml.dir" value="uml" />
<property name="ps" value="${path.separator}"/>
<path id="classpath.base" />
<path id="classpath.test">
<pathelement location="lib/junit-4.11.jar" />
<pathelement location="lib/hamcrest-core-1.3.jar" />
<pathelement location="${main.build.dir}"/>
<path refid="classpath.base" />
</path>
<target name="test" depends="run, clean, UML_doc" />
<target name="compile">
<mkdir dir="${main.build.dir}"/>
<javac srcdir="${main.src.dir}" destdir="${main.build.dir}" includeantruntime="false">
<classpath refid="classpath.base"/>
</javac>
</target>
<target name="build" depends="compile">
<mkdir dir="${test.build.dir}"/>
<javac srcdir="${test.src.dir}" destdir="${test.build.dir}" includeantruntime="false">
<classpath refid="classpath.test"/>
</javac>
<echo message="Build done" />
</target>
<!-- Test and build all files -->
<!-- To run this: use "ant" (default) or "ant run" -->
<target name="run" depends="build">
<junit printsummary="on" haltonfailure="yes">
<classpath>
<path refid="classpath.test" />
<pathelement location="${test.build.dir}"/>
</classpath>
<formatter type="brief" usefile="false" />
<batchtest>
<fileset dir="${test.src.dir}" includes="**/*Test*.java" />
<fileset dir="${test.src.dir}" includes="**/*IT*.java" />
</batchtest>
</junit>
</target>
<target name="doc" depends="compile" description="generate documentation">
<javadoc destdir="${doc.dir}">
<classpath>
<path refid="classpath.test" />
<pathelement location="${test.build.dir}"/>
</classpath>
<fileset dir="${main.src.dir}" includes="**/*.java" />
<fileset dir="${test.src.dir}" includes="**/*.java" />
</javadoc>
</target>
<target name="UML_doc" depends="doc" description="Creates the UML">
<mkdir dir="${uml.dir}"/>
<javadoc destdir="${uml.dir}">
<classpath>
<path refid="classpath.test" />
<pathelement location="${test.build.dir}"/>
</classpath>
<fileset dir="${main.src.dir}" includes="**/*.java" />
<fileset dir="${test.src.dir}" includes="**/*.java" />
<doclet
name="ydoc.doclets.YStandard"
path="./lib/ydoc.jar${ps}./resources${ps}.${uml.dir}">
<param name="-author"/>
<param name="-generic"/>
<param name="-umlautogen"/>
<param name="-filterpath" value="./lib/ydoc.jar"/>
<param name="-filter" value="ydoc.filters.ExcludeFilter"/>
<param name="-tag" value="y.precondition"/>
<param name="-tag" value="y.postcondition"/>
<param name="-tag" value="y.complexity"/>
<param name="-tag" value="param"/>
<param name="-tag" value="return"/>
<param name="-tag" value="see"/>
<param name="-tag" value="y.uml"/>
<param name="-umlfileformat" value="PNG"/>
</doclet>
</javadoc>
</target>
<!-- delete all class files -->
<!-- To run this: use "ant clean" -->
<target name="clean">
<delete>
<fileset dir="${basedir}" includes="**/*.class" />
</delete>
<echo message="clean done" />
</target>
<target name="clean_all" depends="clean">
<delete>
<fileset dir="${doc.dir}" />
<fileset dir="${uml.dir}" />
</delete>
</target>
</project>