-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
169 lines (144 loc) · 6.79 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<project default="complete-build" name="Robocup rescue simulation software">
<property name="version" value="1.0-prealpha"/>
<!-- Modules directory -->
<property name="modules.dir" value="${basedir}/modules"/>
<property name="modules" value="rescuecore2,kernel,standard,sample,handy,human,collapse,misc,resq-fire,ignition,maps,clear,traffic3,gis2"/>
<property name="modules.rescuecore2.depend" value=""/>
<property name="modules.kernel.depend" value="rescuecore2,handy"/>
<property name="modules.standard.depend" value="rescuecore2,kernel"/>
<property name="modules.sample.depend" value="rescuecore2,standard,kernel"/>
<property name="modules.handy.depend" value=""/>
<property name="modules.human.depend" value="rescuecore2,standard,sample"/>
<property name="modules.collapse.depend" value="rescuecore2,standard"/>
<property name="modules.misc.depend" value="rescuecore2,standard"/>
<property name="modules.resq-fire.depend" value="rescuecore2,standard"/>
<property name="modules.ignition.depend" value="rescuecore2,standard"/>
<property name="modules.maps.depend" value="rescuecore2"/>
<property name="modules.clear.depend" value="rescuecore2,standard"/>
<property name="modules.traffic3.depend" value="rescuecore2,standard"/>
<property name="modules.gis2.depend" value="rescuecore2,standard,maps,kernel"/>
<import file="${modules.dir}/rescuecore2/build.xml" optional="true"/>
<import file="${modules.dir}/kernel/build.xml" optional="true"/>
<import file="${modules.dir}/standard/build.xml" optional="true"/>
<import file="${modules.dir}/sample/build.xml" optional="true"/>
<import file="${modules.dir}/handy/build.xml" optional="true"/>
<import file="${modules.dir}/human/build.xml" optional="true"/>
<import file="${modules.dir}/collapse/build.xml" optional="true"/>
<import file="${modules.dir}/misc/build.xml" optional="true"/>
<import file="${modules.dir}/resq-fire/build.xml" optional="true"/>
<import file="${modules.dir}/ignition/build.xml" optional="true"/>
<import file="${modules.dir}/maps/build.xml" optional="true"/>
<import file="${modules.dir}/clear/build.xml" optional="true"/>
<import file="${modules.dir}/traffic3/build.xml" optional="true"/>
<import file="${modules.dir}/gis2/build.xml" optional="true"/>
<!-- 3rd party libraries used by all modules -->
<property name="lib.dir" value="${basedir}/lib"/>
<!-- Output directory - classes, unit test results etc -->
<property name="build.dir" value="${basedir}/build"/>
<!-- Output directory - jar'd class files and resources for all modules -->
<property name="jar.dir" value="${basedir}/jars"/>
<!-- Supplement directory - a place to put stuff that lives on the classpath, e.g. log4j configuration -->
<property name="supplement.dir" value="${basedir}/supplement"/>
<!-- Build tools directory -->
<property name="buildtools.dir" value="${basedir}/build-tools"/>
<!-- Ant-contrib -->
<property name="antcontrib.dir" value="${buildtools.dir}/ant-contrib"/>
<property name="antcontrib.version" value="1.0b3"/>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${antcontrib.dir}/ant-contrib-${antcontrib.version}.jar"/>
</classpath>
</taskdef>
<!-- Whether to compile with debugging symbols -->
<property name="debug" value="true"/>
<!-- General javac flags -->
<property name="javac.flags" value="-Xlint:unchecked,deprecation"/>
<path id="path.jars">
<fileset dir="${jar.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="path.lib">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="path.supplement">
<dirset dir="${supplement.dir}"/>
</path>
<path id="path.common">
<path refid="path.supplement"/>
<path refid="path.jars"/>
<path refid="path.lib"/>
</path>
<!-- Old simulators -->
<target name="oldsims" description="Compile all the old simulators">
<javac srcdir="${basedir}/oldsims/" debug="${debug}">
<include name="rescuecore/**/*.java"/>
</javac>
<jar destfile="${lib.dir}/rescuecore.jar">
<fileset dir="${basedir}/oldsims" includes="rescuecore/**/*.class"/>
</jar>
<javac srcdir="${basedir}/oldsims/" debug="${debug}">
<include name="firesimulator/**/*.java"/>
<classpath>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
<jar destfile="${lib.dir}/resq-fire.jar">
<fileset dir="${basedir}/oldsims" includes="firesimulator/**/*.class"/>
</jar>
</target>
<!-- Clean targets -->
<macrodef name="_clean">
<attribute name="module"/>
<sequential>
<echo message="Cleaning module @{module}"/>
<delete dir="${build.dir}/@{module}" failonerror="false"/>
<delete dir="${junit.output.dir}/@{module}" failonerror="false"/>
<delete dir="${jar.dir}/@{module}.jar" failonerror="false"/>
<delete dir="${cobertura.instrument.dir}/@{module}.jar" failonerror="false"/>
</sequential>
</macrodef>
<target name="build-clean">
<delete dir="${build.dir}"/>
<delete dir="${jar.dir}"/>
<delete dir="${cobertura.instrument.dir}"/>
<for list="${modules}" param="module">
<sequential>
<_clean module="@{module}"/>
</sequential>
</for>
</target>
<target name="oldsims-clean" description="Clean all the old simulators">
<delete>
<fileset dir="${basedir}/oldsims/">
<include name="rescuecore/**/*.class"/>
<include name="firesimulator/**/*.class"/>
</fileset>
</delete>
</target>
<target name="javadoc-clean" description="Clean up old javadocs">
<delete dir="${javadoc.dir}"/>
</target>
<target name="clean" depends="build-clean, oldsims-clean, javadoc-clean"/>
<target name="clean-all">
<delete dir="${build.dir}" failonerror="false"/>
<delete dir="${jar.dir}" failonerror="false"/>
<delete dir="${javadoc.dir}" failonerror="false"/>
</target>
<!-- Combined targets -->
<target name="test-static" depends="checkstyle, findbugs" description="Run the static tests (checkstyle and findbugs) for all modules"/>
<target name="test-unit" depends="cobertura, junit, junit-report, cobertura-report" description="Run the unit tests (junit and cobertura) for all modules"/>
<target name="test-all" depends="test-static, test-unit" description="Run the static and unit tests for all modules"/>
<target name="complete-build" depends="clean-all, oldsims, compile, jars, javadoc, test-all" description="Do a complete clean and rebuild: clean, compile, jar and run all tests"/>
<import file="build-compile.xml"/>
<import file="build-findbugs.xml"/>
<import file="build-checkstyle.xml"/>
<import file="build-junit.xml"/>
<import file="build-javadoc.xml"/>
<import file="build-dist.xml"/>
<import file="build-misc.xml"/>
</project>