-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
330 lines (303 loc) · 11.9 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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<?xml version="1.0" encoding="UTF-8"?>
<project name="dANN" default="all" basedir=".">
<taskdef name="lint4j" classname="com.jutils.lint4j.ant.Lint4jAntTask">
<classpath>
<pathelement location="lib/lint/lint4j.jar"/>
</classpath>
</taskdef>
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
<classpath>
<pathelement location="lib/findbugs/findbugs-ant.jar"/>
<pathelement location="lib/findbugs/bcel.jar"/>
<pathelement location="lib/findbugs/dom4j-1.6.1.jar"/>
<pathelement location="lib/findbugs/jFormatString.jar"/>
<pathelement location="lib/findbugs/asm-3.1.jar"/>
<pathelement location="lib/findbugs/asm-commons-3.1.jar"/>
<pathelement location="lib/findbugs/asm-tree-3.1.jar"/>
<pathelement location="lib/findbugs/jsr305.jar"/>
<pathelement location="lib/findbugs/commons-lang-2.4.jar"/>
</classpath>
</taskdef>
<taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
<classpath>
<pathelement location="lib/checkstyle/checkstyle-5.0.jar"/>
<pathelement location="lib/checkstyle/commons-beanutils-core.jar"/>
<pathelement location="lib/checkstyle/commons-cli-1.1.jar"/>
<pathelement location="lib/checkstyle/commons-logging.jar"/>
<pathelement location="lib/checkstyle/antlr.jar"/>
<pathelement location="lib/checkstyle/google-collect-snapshot-20090211.jar"/>
</classpath>
</taskdef>
<taskdef resource="tasks.properties">
<classpath>
<pathelement location="lib/testing/cobertura.jar"/>
<pathelement location="lib/testing/asm-3.0.jar"/>
<pathelement location="lib/testing/log4j-1.2.9.jar"/>
<pathelement location="lib/testing/asm-tree-3.0.jar"/>
<pathelement location="lib/testing/jakarta-oro-2.0.8.jar"/>
</classpath>
</taskdef>
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask">
<classpath>
<pathelement location="lib/pmd/pmd-4.1.jar"/>
<pathelement location="lib/pmd/jaxen-1.1.1.jar"/>
<pathelement location="lib/pmd/asm-3.1.jar"/>
<pathelement location="lib/pmd/junit-4.4.jar"/>
</classpath>
</taskdef>
<path id="classpath">
<fileset dir="lib" includes="**/*.jar"/>
</path>
<target name="clean">
<delete dir="build"/>
<delete file="cobertura.ser"/>
</target>
<target name="javadoc">
<mkdir dir="build/javadoc"/>
<delete includeemptydirs="true">
<fileset dir="build/javadoc" includes="**/*"/>
</delete>
<javadoc destdir="build/javadoc/" classpathref="classpath">
<fileset dir="src/com/syncleus/dann" includes="**/*.java"/>
</javadoc>
</target>
<target name="lint" description="Perform lint checks">
<mkdir dir="build/lint"/>
<lint4j packages="com.syncleus.*" level="5">
<sourcepath>
<dirset dir="src">
<include name="**/*.java" />
</dirset>
<pathelement path="src/" />
</sourcepath>
<classpath>
<fileset dir="lib/">
<include name="**/*.jar" />
</fileset>
</classpath>
<formatters>
<formatter type="text" />
<formatter type="xml" toFile="build/lint/all.xml"/>
</formatters>
</lint4j>
</target>
<target name="compile">
<delete dir="build/classes"/>
<mkdir dir="build/classes"/>
<javac destdir="build/classes" classpathref="classpath" debug="true" excludes="com/syncleus/tests/**" srcdir="src">
<compilerarg value="-Xlint:unchecked"/>
</javac>
<mkdir dir="build/tests/classes"/>
<javac destdir="build/tests/classes" classpathref="classpath" debug="true" srcdir="src">
<include name="com/syncleus/tests/**"/>
<compilerarg value="-Xlint:unchecked"/>
</javac>
<delete dir="build/tests/classes/com/syncleus/dann"/>
<mkdir dir="build/coverage/classes"/>
<cobertura-instrument todir="build/coverage/classes">
<fileset dir="build">
<include name="classes/**/*.class"/>
<include name="tests/classes/**/*.class"/>
</fileset>
</cobertura-instrument>
</target>
<target name="compile-warnings">
<delete dir="build/classes"/>
<mkdir dir="build/classes"/>
<javac destdir="build/classes" classpathref="classpath" debug="true" excludes="com/syncleus/tests/**" srcdir="src">
<compilerarg value="-Xlint"/>
</javac>
<mkdir dir="build/tests/classes"/>
<javac destdir="build/tests/classes" classpathref="classpath" debug="true" srcdir="src">
<include name="com/syncleus/tests/**"/>
<compilerarg value="-Xlint:unchecked"/>
</javac>
<delete dir="build/tests/classes/com/syncleus/dann"/>
<mkdir dir="build/coverage/classes"/>
<cobertura-instrument todir="build/coverage/classes">
<fileset dir="build">
<include name="classes/**/*.class"/>
<include name="tests/classes/**/*.class"/>
</fileset>
</cobertura-instrument>
</target>
<target name="build">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/dann.jar" basedir="build/classes">
<manifest>
<attribute name="Product-Name" value="dANN"/>
<attribute name="Package-Title" value="com.syncleus.dann"/>
<attribute name="Package-Version" value="2.0"/>
<attribute name="Specification-Title" value="An Artificial Intelligence library."/>
<attribute name="Specification-Vendor" value="Syncleus, Inc."/>
<attribute name="Specification-Version" value="2.0"/>
<attribute name="Implementation-Title" value="An Artificial Intelligence library."/>
<attribute name="Implementation-Vendor" value="Syncleus, Inc."/>
<attribute name="Implementation-Vendor-Id" value="com.syncleus.dann"/>
<attribute name="Implementation-Version" value="2.0"/>
</manifest>
</jar>
<jar destfile="build/jar/dann-tests.jar" basedir="build/tests/classes">
<manifest>
<attribute name="Product-Name" value="dANN"/>
<attribute name="Package-Title" value="com.syncleus.dann"/>
<attribute name="Package-Version" value="2.0"/>
<attribute name="Specification-Title" value="An Artificial Intelligence library."/>
<attribute name="Specification-Vendor" value="Syncleus, Inc."/>
<attribute name="Specification-Version" value="2.0"/>
<attribute name="Implementation-Title" value="An Artificial Intelligence library."/>
<attribute name="Implementation-Vendor" value="Syncleus, Inc."/>
<attribute name="Implementation-Vendor-Id" value="com.syncleus.dann"/>
<attribute name="Implementation-Version" value="2.0"/>
</manifest>
</jar>
<jar destfile="build/jar/dann-coverage.jar" basedir="build/coverage/classes">
<manifest>
<attribute name="Product-Name" value="dANN"/>
<attribute name="Package-Title" value="com.syncleus.dann"/>
<attribute name="Package-Version" value="2.0"/>
<attribute name="Specification-Title" value="An Artificial Intelligence library."/>
<attribute name="Specification-Vendor" value="Syncleus, Inc."/>
<attribute name="Specification-Version" value="2.0"/>
<attribute name="Implementation-Title" value="An Artificial Intelligence library."/>
<attribute name="Implementation-Vendor" value="Syncleus, Inc."/>
<attribute name="Implementation-Vendor-Id" value="com.syncleus.dann"/>
<attribute name="Implementation-Version" value="2.0"/>
</manifest>
</jar>
</target>
<target name="tests-nocoverage">
<mkdir dir="build/tests"/>
<junit printsummary="yes" haltonfailure="no" showoutput="yes" >
<classpath>
<pathelement location="build/jar/dann.jar"/>
<pathelement location="build/jar/dann-tests.jar"/>
<pathelement location="lib/testing/junit-4.6.jar"/>
<pathelement location="lib/log4j-1.2.15.jar"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="build/tests">
<fileset dir="src">
<include name="com/syncleus/tests/**/Test*.java"/>
<exclude name="**/AllTests.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="tests-coverage">
<mkdir dir="build/coverage/tests"/>
<junit printsummary="yes" haltonfailure="no" showoutput="yes" >
<classpath>
<pathelement location="build/jar/dann-coverage.jar"/>
<pathelement location="build/jar/dann.jar"/>
<pathelement location="build/jar/dann-tests.jar"/>
<pathelement location="lib/testing/junit-4.6.jar"/>
<pathelement location="lib/testing/cobertura.jar"/>
<pathelement location="lib/log4j-1.2.15.jar"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="build/coverage/tests">
<fileset dir="src">
<include name="com/syncleus/tests/**/Test*.java"/>
<exclude name="**/AllTests.java"/>
</fileset>
</batchtest>
</junit>
<mkdir dir="build/coverage/reports"/>
<cobertura-report format="xml" srcdir="src/" destdir="build/coverage/reports"/>
<move file="./cobertura.ser" tofile="build/coverage/cobertura.ser"/>
</target>
<target name="test-wavelets">
<mkdir dir="build/coverage/tests"/>
<junit printsummary="yes" haltonfailure="no" showoutput="yes" >
<classpath>
<pathelement location="build/jar/dann-coverage.jar"/>
<pathelement location="build/jar/dann.jar"/>
<pathelement location="build/jar/dann-tests.jar"/>
<pathelement location="lib/testing/junit-4.6.jar"/>
<pathelement location="lib/testing/cobertura.jar"/>
<pathelement location="lib/log4j-1.2.15.jar"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="build/coverage/tests">
<fileset dir="src">
<include name="com/syncleus/tests/**/Test*.java"/>
<exclude name="**/AllTests.java"/>
</fileset>
</batchtest>
</junit>
<mkdir dir="build/coverage/reports"/>
<cobertura-report format="xml" srcdir="src/" destdir="build/coverage/reports"/>
<move file="./cobertura.ser" tofile="build/coverage/cobertura.ser"/>
</target>
<target name="findbugs">
<mkdir dir="build/findbugs"/>
<findbugs home="lib/findbugs/"
output="xml"
outputFile="build/findbugs/findbugs-report.xml" >
<auxClasspath path="lib/j3dcore.jar"/>
<auxClasspath path="lib/freehep-j3d.jar"/>
<auxClasspath path="lib/j3dutils.jar"/>
<auxClasspath path="lib/vecmath.jar"/>
<auxClasspath path="lib/log4j-1.2.15.jar"/>
<sourcePath path="src/" />
<class location="build/jar/dann.jar" />
</findbugs>
</target>
<target name="checkstyle">
<mkdir dir="build/checkstyle"/>
<checkstyle config="checks.xml" maxErrors="2147483647">
<fileset dir="src" includes="**/*.java"/>
<formatter type="plain"/>
<formatter type="xml" toFile="build/checkstyle/checkstyle-report.xml"/>
</checkstyle>
</target>
<target name="pmd">
<mkdir dir="build/pmd"/>
<pmd rulesetfiles="pmd.xml">
<formatter type="xml" toFile="build/pmd/pmd-report.xml"/>
<fileset dir="src/">
<include name="**/*.java"/>
</fileset>
</pmd>
</target>
<target name="profile">
<nbprofiledirect>
<classpath>
<pathelement location="build/jar/dann.jar"/>
<pathelement location="lib/testing/junit-4.6.jar"/>
<pathelement location="lib/log4j-1.2.15.jar"/>
<pathelement location="lib/j3dcore.jar"/>
<pathelement location="lib/freehep-j3d.jar"/>
<pathelement location="lib/j3dutils.jar"/>
<pathelement location="lib/vecmath.jar"/>
<path location="../java_dann_examples/build/jar/dann_examples.jar"/>
</classpath>
</nbprofiledirect>
<java fork="true" classname="com.syncleus.core.dann.examples.Main">
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg value="-Xmx512m" />
<classpath>
<pathelement location="build/jar/dann.jar"/>
<pathelement location="lib/testing/junit-4.6.jar"/>
<pathelement location="lib/log4j-1.2.15.jar"/>
<pathelement location="lib/j3dcore.jar"/>
<pathelement location="lib/freehep-j3d.jar"/>
<pathelement location="lib/j3dutils.jar"/>
<pathelement location="lib/vecmath.jar"/>
<path location="../java_dann_examples/build/jar/dann_examples.jar"/>
</classpath>
</java>
</target>
<target name="build-all">
<antcall target="clean"/>
<antcall target="compile"/>
<antcall target="build"/>
</target>
<target name="all">
<antcall target="clean"/>
<antcall target="compile"/>
<antcall target="build"/>
<antcall target="tests"/>
</target>
</project>