-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
287 lines (252 loc) · 13.4 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<!--
* This file is part of LAIS (LaSEEB Agent Interaction Simulator).
*
* LAIS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LAIS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LAIS. If not, see <http://www.gnu.org/licenses/>.
-->
<!-- ========================================================== -->
<!-- Adapted from the buildfile for Repast J 3.1 -->
<!-- ========================================================== -->
<project name="LAIS" default="usage" basedir=".">
<description>
Ant build file for LAIS.
</description>
<!-- =================================================================== -->
<!-- Properties -->
<!-- =================================================================== -->
<tstamp />
<property name="name" value="LAIS" />
<property name="version" value="0.3.0" />
<property name="year" value="2013" />
<!-- Define the project base directories -->
<property name="root.dir" value="." />
<property name="doc.dir" value="${root.dir}/doc" />
<property name="lib.dir" value="${root.dir}/lib" />
<property name="src.dir" value="${root.dir}/src" />
<property name="util.dir" value="${root.dir}/util" />
<property name="resource.dir" value="${root.dir}/resources" />
<property name="example.dir" value="${root.dir}/examples" />
<property name="test.src.dir" value="${root.dir}/src_tests" />
<!-- Define the project binary directories -->
<property name="bin.dir" value="${root.dir}/bin" />
<property name="test.bin.dir" value="${root.dir}/bin_tests" />
<property name="test.reports.dir" value="${root.dir}/test_reports" />
<!-- Define the distribution directories -->
<property name="dist.dir" value="${root.dir}/dist/LAIS" />
<property name="dist.doc.dir" value="${dist.dir}/doc" />
<property name="dist.util.dir" value="${dist.dir}/util" />
<property name="dist.lib.dir" value="${dist.dir}/lib" />
<property name="dist.src.dir" value="${dist.dir}/src" />
<property name="dist.example.dir" value="${dist.dir}/examples" />
<property name="dist.resource.dir" value="${dist.dir}/resources" />
<!-- Classpath -->
<path id="project.class.path">
<pathelement location="lib/"/>
<pathelement path="lib/asm.jar"/>
<pathelement path="lib/beanbowl.jar"/>
<pathelement path="lib/colt.jar"/>
<pathelement path="lib/jmf.jar"/>
<pathelement path="lib/junit-4.5.jar"/>
<pathelement path="lib/log4j-1.2.15.jar"/>
<pathelement path="lib/plot.jar"/>
<pathelement path="lib/ProActive.jar"/>
<pathelement path="lib/repast.jar"/>
<pathelement path="lib/simple-xml-2.1.4.jar"/>
<pathelement path="lib/trove.jar"/>
<pathelement path="lib/violinstrings-1.0.2.jar"/>
</path>
<!-- =================================================================== -->
<!-- Help on usage -->
<!-- =================================================================== -->
<target name="usage">
<echo message="" />
<echo message="" />
<echo message="=== LAIS build control ===" />
<echo message="" />
<echo message=" Available targets are:" />
<echo message="" />
<echo message=" -----> Creating distributions in ${dist.dir}:" />
<echo message=" lais-all --> Creates a complete distribution." />
<echo message=" lais-min --> Creates a minimum running distribution (no source, api, utils)." />
<echo message=" -----> Build options:" />
<echo message=" compile --> Compiles LAIS in ${bin.dir}." />
<echo message=" javadoc --> Creates LAIS documentation in ${doc.dir}" />
<echo message=" jar --> Creates a LAIS JAR file in ${dist.dir}." />
<echo message=" -----> Clean options:" />
<echo message=" clean-all --> Clean everything (i.e., calls cleans bollow)." />
<echo message=" clean-bin --> Clean LAIS binaries in ${bin.dir}." />
<echo message=" clean-docs --> Clean documentation in ${doc.dir}." />
<echo message=" clean-dist --> Clean distribution in ${dist.dir}." />
<echo message=" -----> Test options:" />
<echo message=" compile-test --> Compiles LAIS in ${test.bin.dir}." />
<echo message=" clean-test --> Clean test binaries in ${test.bin.dir}." />
<echo message=" -----> Other options:" />
<echo message=" usage --> Displays this menu (default)." />
<echo message="" />
<echo message=" See the comments inside the build.xml file for more details." />
<echo message="-------------------------------------------------------------" />
<echo message="" />
<echo message="" />
</target>
<!-- =================================================================== -->
<!-- Creates a distribution directory -->
<!-- =================================================================== -->
<target name="-distdir">
<mkdir dir="${dist.dir}" />
</target>
<!-- =================================================================== -->
<!-- Creates full distribution -->
<!-- =================================================================== -->
<target name="lais-all" depends="clean-all, compile, javadoc, -distdir, jar, -copy-all" />
<!-- =================================================================== -->
<!-- Creates minimum distribution -->
<!-- =================================================================== -->
<target name="lais-min" depends="clean-dist, clean-bin, compile, -distdir, jar, -copy-libs, -copy-other, -copy-examples" />
<!-- =================================================================== -->
<!-- Copies all necessary files into the distribution directory -->
<!-- =================================================================== -->
<target name="-copy-all" depends="-distdir, -copy-examples, -copy-src, -copy-docs, -copy-utils, -copy-libs, -copy-other" />
<!-- =================================================================== -->
<!-- Copies external libraries into the distribution directory -->
<!-- =================================================================== -->
<target name="-copy-libs" depends="-distdir">
<mkdir dir="${dist.lib.dir}" />
<copy todir="${dist.lib.dir}">
<fileset dir="${lib.dir}" />
</copy>
</target>
<!-- =================================================================== -->
<!-- Copies examples into the distribution directory -->
<!-- =================================================================== -->
<target name="-copy-examples" depends="-distdir">
<mkdir dir="${dist.example.dir}" />
<copy todir="${dist.example.dir}">
<fileset dir="${example.dir}" />
</copy>
</target>
<!-- =================================================================== -->
<!-- Copies source files into the distribution directory -->
<!-- =================================================================== -->
<target name="-copy-src" depends="-distdir">
<mkdir dir="${dist.src.dir}" />
<copy todir="${dist.src.dir}">
<fileset dir="${src.dir}" />
</copy>
</target>
<!-- =================================================================== -->
<!-- Copies examples into the distribution directory -->
<!-- =================================================================== -->
<target name="-copy-docs" depends="-distdir">
<mkdir dir="${dist.doc.dir}" />
<copy todir="${dist.doc.dir}">
<fileset dir="${doc.dir}"/>
</copy>
</target>
<!-- =================================================================== -->
<!-- Copies utilities into the distribution directory -->
<!-- =================================================================== -->
<target name="-copy-utils" depends="-distdir">
<mkdir dir="${dist.util.dir}" />
<copy todir="${dist.util.dir}">
<fileset dir="${util.dir}" />
</copy>
</target>
<!-- =================================================================== -->
<!-- Copies other files into distribution directory -->
<!-- =================================================================== -->
<target name="-copy-other" depends="-distdir">
<mkdir dir="${dist.dir}" />
<copy file="LAIS.properties" todir="${dist.dir}"/>
<copy file="lais_dos.bat" todir="${dist.dir}"/>
<copy file="lais_linux.sh" todir="${dist.dir}"/>
<copy file="lais_win.vbs" todir="${dist.dir}"/>
<copy file="logdefs.xml" todir="${dist.dir}"/>
<chmod file="${dist.dir}/lais_linux.sh" perm="ugo+x"/>
</target>
<!-- =================================================================== -->
<!-- Compiles the LAIS source code -->
<!-- =================================================================== -->
<target name="compile" depends="clean-bin">
<mkdir dir="bin"/>
<javac source="1.6" target="1.6" srcdir="${src.dir}" destdir="${bin.dir}">
<classpath refid="project.class.path"/>
</javac>
</target>
<!-- =================================================================== -->
<!-- Creates the lais.jar in distribution directory -->
<!-- =================================================================== -->
<target name="jar" depends="compile">
<delete file="lais.jar"/>
<mkdir dir="${dist.resource.dir}" />
<copy todir="${dist.resource.dir}">
<fileset dir="${resource.dir}" />
</copy>
<jar destfile="${dist.dir}/lais.jar" basedir="${bin.dir}">
<manifest>
<attribute name="Built-By" value="LaSEEB" />
<attribute name="Class-Path" value="resources/images.jar lib/asm.jar lib/beanbowl.jar lib/colt.jar lib/jmf.jar lib/junit-4-5.jar lib/log4j-1.2.15.jar lib/plot.jar lib/ProActive.jar lib/repast.jar lib/simple-xml-2.1.4.jar lib/trove.jar l lib/violinstrings-1.0.2.jar" />
<attribute name="Main-Class" value="org.laseeb.LAIS.LAIS" />
</manifest>
</jar>
</target>
<!-- =================================================================== -->
<!-- Creates the API documentation -->
<!-- =================================================================== -->
<target name="javadoc" depends="clean-docs">
<mkdir dir="${doc.dir}" />
<javadoc access="package" author="true" destdir="${doc.dir}" doctitle="LAIS Documentation" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" overview="src/overview.html" packagenames="org.laseeb.LAIS.agent,org.laseeb.LAIS.event,org.laseeb.LAIS.event.agdeploy,org.laseeb.LAIS.gui,org.laseeb.LAIS.space,org.laseeb.LAIS,org.laseeb.LAIS.agent.conditions,org.laseeb.LAIS.agent.actions,org.laseeb.LAIS.substance,org.laseeb.LAIS.utils,org.laseeb.LAIS.event.subdeploy,org.laseeb.LAIS.output" source="1.6" sourcepath="src" splitindex="true" use="true" version="true">
<classpath refid="project.class.path" />
<link href="http://acs.lbl.gov/~hoschek/colt/api"/>
<link href="http://simple.sourceforge.net/download/stream/doc/javadoc/"/>
<link href="http://repast.sourceforge.net/api/"/>
<link href="http://java.sun.com/javase/6/docs/api/"/>
</javadoc>
</target>
<!-- =================================================================== -->
<!-- Clean everything -->
<!-- =================================================================== -->
<target name="clean-all" depends="clean-bin, clean-docs, clean-dist" />
<!-- =================================================================== -->
<!-- Clean documents -->
<!-- =================================================================== -->
<target name="clean-docs">
<delete dir="${docs.dir}" />
</target>
<!-- =================================================================== -->
<!-- Clean distribution -->
<!-- =================================================================== -->
<target name="clean-dist">
<delete dir="${dist.dir}" />
</target>
<!-- =================================================================== -->
<!-- Clean binaries -->
<!-- =================================================================== -->
<target name="clean-bin">
<delete dir="${bin.dir}" />
</target>
<!-- =================================================================== -->
<!-- Compiles the tests -->
<!-- =================================================================== -->
<target name="compile-test" depends="clean-test">
<javac target="1.6" srcdir="${test.src.dir}" destdir="${test.bin.dir}">
<classpath refid="project.class.path"/>
</javac>
</target>
<!-- =================================================================== -->
<!-- Clean test binaries -->
<!-- =================================================================== -->
<target name="clean-test">
<delete dir="${test.bin.dir}" />
</target>
</project>
<!-- End of file -->