-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
102 lines (91 loc) · 2.89 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
102
<project>
<property name="build.dir" value="build"/>
<property name="class.dir" value="${build.dir}/classes"/>
<property name="test.class.dir" value="${build.dir}/test-classes"/>
<property name="src.dir" value="src"/>
<property name="test.dir" value="test"/>
<property name="lib.dir" value="lib"/>
<property name="javadoc.dir" value="javadoc"/>
<property name="xml.resources" value="resources/xml"/>
<loadproperties srcFile="resources/VERSION"/>
<property name="version" value="${version.major}.${version.minor}.${version.build}"/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
<pathelement location="${class.dir}"/>
<pathelement location="${test.class.dir}"/>
</path>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${javadoc.dir}"/>
</target>
<target name="out_dirs">
<!-- check if dirs exist and if not, make them -->
<mkdir dir="${build.dir}"/>
<mkdir dir="${class.dir}"/>
<mkdir dir="${test.class.dir}"/>
</target>
<target name="compile" depends="out_dirs">
<javac srcdir="${src.dir}" destdir="${class.dir}" classpathref="classpath" includeantruntime="false"/>
</target>
<target name="test-compile" depends="out_dirs,compile">
<javac srcdir="${test.dir}" destdir="${test.class.dir}" classpathref="classpath"/>
</target>
<target name="test" depends="compile,test-compile">
<junit printsummary="yes">
<classpath>
<path refid="classpath"/>
</classpath>
<batchtest >
<fileset dir="${test.dir}">
<include name="**/*.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="jar" depends="compile">
<jar destfile="adasim-${version}.jar" manifest="resources/MANIFEST.MF">
<fileset dir="${class.dir}"/>
<fileset dir=".">
<include name="resources/xml/adasim.xsd"/>
<include name="resources/VERSION"/>
</fileset>
</jar>
</target>
<target name="jar-deps" depends="compile">
<jar destfile="adasim-${version}-deps.jar" manifest="resources/MANIFEST.MF">
<fileset dir="${class.dir}"/>
<fileset dir=".">
<include name="resources/xml/adasim.xsd"/>
<include name="resources/VERSION"/>
</fileset>
<archives>
<zips>
<fileset dir="${lib.dir}" includes="**/*.jar" excludes="**/junit*.jar"/>
</zips>
</archives>
</jar>
</target>
<target name="javadoc">
<!-- Target for end user Javadoc -->
<javadoc sourcepath="${src.dir}"
destdir="${javadoc.dir}"
access="protected"
Doctitle="Adasim End-User API Documentation"
Author="no"
classpathref="classpath">
<excludepackage name="**.internal"/>
<excludepackage name="**.generator"/>
</javadoc>
</target>
<target name="dev-javadoc">
<!-- Target for end user Javadoc -->
<javadoc sourcepath="${src.dir}"
destdir="${javadoc.dir}"
classpathref="classpath"
access="private"
Doctitle="Adasim Developer API Documentation"
Use="yes"
Author="yes">
</javadoc>
</target>
</project>