-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
587 lines (552 loc) · 24 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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
<?xml version="1.0" encoding="iso-8859-1" ?>
<!-- $Id$ -->
<project name="align" default="compile" basedir="."
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<!-- this is useful but introduces, Xlint:path warnings -->
<path id="classpath">
<fileset dir="./lib">
<include name="**/*.jar"/>
<!-- several useless (and may be harmful) things at the moment -->
<exclude name="seals/seals-omt-client.jar" />
<!--exclude name="slf4j/logback-core-1.0.9.jar" />
<exclude name="slf4j/logback-classic-1.0.9.jar" /-->
</fileset>
</path>
<!-- tested -->
<target name="usage" depends="versionnumber">
<echo>ant _target_ _options_
usage: this message
init: sets necessary variables
upgrade: retrieve necessary libraries from other projects (local)
compile: incrementaly compiles sources
compileall: recompiles all sources
lint: compiles all sources with bug flags on
jar: archives compiled code
test: performs unit tests
aserv: creates an empty jar file for launching servers
zip: creates a new zip file
javadoc: generates documentation
release: releases a new version
mavenize: creates a maven local repository
cover: check test coverage
analyse: perform static analysis
svnbranch: copy the version under svn
clean: clean-up before release
-Dversion=${version} -Dsvn.revision=${svn.revision} -Dversion.update=${version.update}
</echo>
</target>
<target name="bind" description="Set variables">
<property file="../build.properties"/>
<!-- This should now be handled by GForge -->
<property name="tooldir" value="tools" />
<property name="libdir" value="lib" />
<property name="classpath" value="classes"/>
<property name="tempdir" value="/tmp"/>
<!-- when using logback -->
<property name="logback.configurationFile" value="logback.xml"/>
</target>
<target name="versionnumber" depends="bind" description="Establishes the version number">
<tstamp><format locale="fr,fr" pattern="dd/MM/yyyy" property="date"/></tstamp>
<property name="version.major" value="4"/>
<property name="version.minor" value="7"/>
<property name="copyyear" value="2003-2014"/>
<!-- first attempt -->
<exec executable="svnversion" outputproperty="svn.rev" failifexecutionfails="false"/>
<condition property="svn.revision" value="${svn.rev}" else="nosvn">
<isset property="svn.rev"/>
</condition>
<!-- second attempt -->
<!--exec executable="svn" output="/tmp/svn.properties">
<arg value="info" />
</exec-->
<property prefix="svn" file="/tmp/svn.properties"/>
<property name="svn.rev" value="${svn.Revision}"/>
<property name="version" value="${version.major}.${version.minor}"/>
<property name="login" value="${user.name}"/>
<property name="debug" value="off"/>
<property name="rep" value="svn+ssh://scm.gforge.inria.fr/svn/alignapi"/>
<filter token="DATE" value="${date}"/>
<filter token="VERS" value="${version}"/>
</target>
<target name="upgrade" description="Upgrade local dependencies">
<copy file="../ontosim/lib/ontosim.jar" todir="lib/ontosim" filtering="false"/>
<echo message="Do not forget to upgrade the POM that ontosim has not" />
</target>
<!-- tested -->
<target name="compile" depends="bind" description="Incrementally compile source files">
<echo message="Compiling..."/>
<property name="javacargs" value="-deprecation" />
<mkdir dir="classes"/>
<javac deprecation="yes" includeantruntime="false" nowarn="no" verbose="no" srcdir="src" destdir="classes" encoding="iso8859-15">
<compilerarg value="${javacargs}"/>
<classpath refid="classpath"/>
</javac>
</target>
<!-- tested -->
<target name="compileall" depends="versionnumber" description="Recompile all source files and create jar">
<echo message="Erasing..."/>
<delete>
<fileset dir="." includes="classes/**/*.class"/>
</delete>
<antcall target="cleanjar"/>
<antcall target="jar"/>
<ant dir="plugins/neon" target="compileall" />
<ant dir="plugins/webcontent" target="compileall" />
<ant dir="plugins/android" target="compileall" />
</target>
<!-- tested -->
<target name="lint" depends="bind" description="Check sources for warnings">
<echo message="Setting property..."/>
<!-- values: all,cast,classfile,deprecation,dep-ann,divzero,empty,fallthrough,finally,options,overrides,path,processing,rawtypes,serial,static,try,unchecked,varargs,-cast,-classfile,-deprecation,-dep-ann,-divzero,-empty,-fallthrough,-finally,-options,-overrides,-path,-processing,-rawtypes,-serial,-static,-try,-unchecked,-varargs,none -->
<!--property name="javacargs" value="-Xlint:" /-->
<property name="javacargs" value="-Xlint:all" />
<antcall target="compileall"/>
</target>
<target name="analyse" depends="jar" description="Perform static analysis of code">
<!-- Checkstyle
<taskdef resource="checkstyletask.properties"
classpath="${tooldir}/checkstyle/checkstyle-all-5.0.jar"/-->
<!-- // I must have a checks.xml -->
<!--checkstyle config="docs/sun_checks.xml">
<fileset dir="src" includes="**/*.java"/>
// let see if we can put a css
<formatter type="xml" toFile="test/html/checkstyle.xml"/>
</checkstyle-->
<!-- FindBugs
<taskdef name="findbugs" classpath="${tooldir}/findbugs/findbugs-ant.jar" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/>
<findbugs home="test/html/"
output="xml"
outputFile="bcel-fb.xml" >
//<auxClasspath path="${basedir}/lib/Regex.jar" />
<sourcePath path="src" />
<class location="lib/align.jar" />
</findbugs-->
<!-- Use PMD
<taskdef name="pmd" classpath="${tooldir}/pmd/pmd-ant.jar" classname="net.sourceforge.pmd.ant.PMDTask"/>
<pmd shortFilenames="true">
<ruleset>rulesets/favorites.xml</ruleset>
<ruleset>basic</ruleset>
<formatter type="html" toFile="pmd_report.html" linkPrefix="http://pmd.sourceforge.net/xref/"/>
<fileset dir="/usr/local/j2sdk1.4.1_01/src/">
<include name="java/lang/*.java"/>
</fileset>
</pmd-->
<echo message="Wait... this is quite long" />
<taskdef name="tattletale-report"
classname="org.jboss.tattletale.ant.ReportTask"
classpath="${tooldir}/tattletale/tattletale-ant.jar:${tooldir}/tattletale/tattletale.jar:${tooldir}/tattletale/javassist.jar"/>
<tattletale-report source="lib" destination="tattletale"/>
<!-- For tattletale, look at dependencies in "tattletale/graphviz/dependencies.dot" -->
<!-- Emma (coverage) seems really difficult -->
<!--taskdef resource="emma_ant.properties" classpathref="emma.lib" /-->
</target>
<macrodef name="onejar" description="utility macro for JAR packaging">
<attribute name="group" description="Maven group ID" />
<attribute name="file" description="Artifact name" />
<attribute name="desc" description="Description" />
<attribute name="main" description="Main class to call" default="" />
<attribute name="path" description="Class path" default="" />
<element name="files" description="The fileset Id of the files to include" />
<element name="extramanifest" description="The part of included manifest" optional="yes"/>
<sequential>
<delete file="lib/@{file}.jar"/>
<!-- it may even be easier to generate the pom -->
<copy file="distrib/@{file}.pom" toFile="lib/@{file}.pom" overwrite="true">
<filterset>
<filter token="GROUPID" value="@{group}"/>
<filter token="ARTID" value="@{file}"/>
<filter token="VERS" value="${version}"/>
<filter token="DATE" value="${date}"/>
<filter token="REV" value="${svn.rev}"/>
<filter token="COPYYEAR" value="${copyyear}"/>
</filterset>
</copy>
<jar jarfile="lib/@{file}.jar">
<manifest>
<attribute name="Built-Date" value="${date}"/>
<attribute name="Main-Class" value="@{main}"/>
<attribute name="Class-Path" value="@{path}"/>
<attribute name="Implementation-Title" value="@{desc}"/>
<attribute name="Implementation-Version" value="${version} (${svn.rev})"/>
</manifest>
<extramanifest />
<!-- This should be achieved with a metainf tag, but not working -->
<zipfileset file="classes/LICENSE.TXT" fullpath="META-INF/LICENSE.TXT" />
<zipfileset file="lib/@{file}.pom" fullpath="META-INF/maven/@{group}/@{file}/pom.xml" />
<files />
</jar>
</sequential>
</macrodef>
<!-- tested -->
<target name="jar" depends="compile,versionnumber" description="Create jar archives">
<echo message="Jarchiving..."/>
<copy file="distrib/LICENSE.TXT" tofile="classes/LICENSE.TXT" filtering="true"/>
<!-- align.jar -->
<onejar file="align"
group="org.semanticweb.owl"
desc="Alignment API">
<files>
<fileset dir="classes">
<include name="org/semanticweb/owl/align/*.class"/>
</fileset>
</files>
</onejar>
<!-- ontowrap.jar -->
<copy file="src/fr/inrialpes/exmo/ontowrap/skoslite/skos.rdf" tofile="classes/fr/inrialpes/exmo/ontowrap/skoslite/skos.rdf" />
<onejar file="ontowrap"
group="fr.inrialpes.exmo"
desc="Ontology wrapper"
path="jena/arq.jar jena/iri.jar jena/jena.jar skosapi/skosapi.jar owlapi10/api.jar owlapi10/impl.jar owlapi10/io.jar owlapi10/rdfapi.jar owlapi10/rdfparser.jar owlapi3/owlapi-bin.jar">
<files>
<fileset dir="classes">
<include name="fr/inrialpes/exmo/ontowrap/**/*.class" />
<include name="fr/inrialpes/exmo/ontowrap/**/*.rdf"/>
</fileset>
</files>
</onejar>
<!-- procalign.jar -->
<onejar file="procalign"
group="fr.inrialpes.exmo.align"
desc="Alignment API implementation"
main="fr.inrialpes.exmo.align.cli.Procalign"
path="skosapi/skosapi.jar owlapi30/owlapi-bin.jar ontosim/ontosim.jar cli/commons-cli.jar slf4j/jcl-over-slf4j.jar slf4j/log4j-over-slf4j.jar slf4j/slf4j-api.jar jwnl/jwnl.jar lucene/lucene-core.jar lucene/lucene-analyzers-common.jar jena/jena.jar jena/iri.jar jena/httpcore.jar jena/httpclient.jar iddl/iddl.jar xerces/xercesImpl.jar xerces/resolver.jar xerces/xml-apis.jar hermit/hermit.jar align.jar ontowrap.jar procalign.jar">
<files>
<fileset dir="classes">
<include name="fr/inrialpes/exmo/align/impl/**/*.class"/>
<include name="fr/inrialpes/exmo/align/parser/**/*.class"/>
<include name="fr/inrialpes/exmo/align/util/**/*.class"/>
<include name="fr/inrialpes/exmo/align/cli/**/*.class"/>
<include name="fr/inrialpes/exmo/align/gen/**/*.class"/>
<include name="fr/inrialpes/exmo/align/ling/**/*.class"/>
</fileset>
</files>
</onejar>
<!-- alignsvc.jar -->
<copy file="src/fr/inrialpes/exmo/align/service/aserv.wsdl" tofile="classes/fr/inrialpes/exmo/align/service/aserv.wsdl" filtering="false"/>
<onejar file="alignsvc"
group="fr.inrialpes.exmo.align"
desc="Alignment server"
main="fr.inrialpes.exmo.align.service.AlignmentService"
path="procalign.jar osgi/osgi-core.jar jade/jade.jar jade/iiop.jar jade/http.jar jdbc/mysql-connector-java.jar jdbc/postgresql-jdbc4.jar servlet/servlet-api.jar fileupload/commons-fileupload.jar fileupload/commons-io.jar jetty/jetty-util.jar jetty/jetty-server.jar jetty/jetty-http.jar jetty/jetty-io.jar gson/gson.jar xerces/xercesImpl.jar lang/commons-lang3.jar">
<files>
<fileset dir="classes">
<include name="fr/inrialpes/exmo/align/service/**/*.class"/>
<include name="fr/inrialpes/exmo/align/service/**/*.wsdl"/>
<include name="fr/inrialpes/exmo/queryprocessor/**/*.class"/>
</fileset>
</files>
<extramanifest>
<!-- This is all for OSGI -->
<manifest>
<attribute name="Bundle-Name" value="Alignment server"/>
<attribute name="Bundle-SymbolicName" value="alignsvc"/>
<attribute name="Bundle-Version" value="${version} (${svn.rev})"/>
<attribute name="Bundle-Copyright" value="INRIA, ${copyyear}"/>
<attribute name="Bundle-Date" value="${date}"/>
<attribute name="Bundle-License" value="GNU Lesser General Public License 2.1 or above"/>
<attribute name="Bundle-Activator" value="fr.inrialpes.exmo.align.service.osgi.OSGIAServProfile"/>
<attribute name="Export-package" value="fr.inrialpes.exmo.align.service"/>
<attribute name="Import-package" value="org.osgi.framework"/>
</manifest>
</extramanifest>
</onejar>
</target>
<!-- tested -->
<target name="cleanjar" depends="bind" description="Delete jar archives">
<echo message="Erasing..."/>
<delete file="lib/align.jar"/>
<delete file="lib/ontowrap.jar"/>
<delete file="lib/alignsvc.jar"/>
<delete file="lib/procalign.jar"/>
<delete file="lib/aserv.jar"/>
</target>
<!-- tested -->
<!-- This generate a server jar with a class path containing all
libs in the lib directory. Useful for servers -->
<target name="aserv" depends="bind">
<echo message="Generating aserv jar..."/>
<delete file="lib/aserv.jar" />
<pathconvert property="aserv.classpath" pathsep=" ">
<map from="${user.dir}/${libdir}/" to=""/>
<path>
<fileset dir="./lib">
<include name="**/*.jar"/>
<include name="*.jar"/>
<!-- several useless (and may be harmful) things at the moment -->
<!--exclude name="seals/seals-omt-client.jar" /-->
</fileset>
</path>
<!--flattenmapper /-->
</pathconvert>
<echo message="path: ${aserv.classpath}" />
<jar jarfile="aserv.jar">
<manifest>
<attribute name="Built-Date" value="${date}"/>
<attribute name="Main-Class" value="fr.inrialpes.exmo.align.service.AlignmentService"/>
<!-- usually each MANIFEST knows what it needs, add here -->
<!-- semanticmapper-0.2.jar jwnl.jar sboa.jar TaxoMap.jar AROMA_aserv.jar oyster2.jar, semanticmapper-0.2.jar, sboalgorithms.jar -->
<!-- others should be there naturally -->
<attribute name="Class-Path" value="${aserv.classpath}"/>
<attribute name="Implementation-Title" value="Alignment server custom launcher"/>
<attribute name="Implementation-Version" value="${version} (${svn.rev})"/>
</manifest>
</jar>
<move file="aserv.jar" tofile="lib/aserv.jar" />
</target>
<!-- tested -->
<target name="test" depends="bind" description="Unit test code">
<echo message="Testing..."/>
<echo message="You may also want to try sh test/clitest.sh"/>
<taskdef name="testng" classpath="${tooldir}/testng/testng.jar" classname="org.testng.TestNGAntTask" />
<javac srcdir="test/src" includeantruntime="false" destdir="test/classes" debug="on"
classpath="tools/testng/testng.jar" encoding="iso8859-15">
<!--compilerarg value="-Xlint:all"/-->
<classpath refid="classpath"/>
</javac>
<!-- possible groups: raw=impl+serv+io+onto+omwg, full=raw+ling+sem -->
<!-- ling requires WordNet and takes ages initialising it -->
<testng groups="raw"
outputDir="test/html" verbose="1"
haltOnFailure="false" failureProperty="failed">
<!-- if ones uses logback -->
<propertyset>
<propertyref name="logback.configurationFile"/>
</propertyset>
<classpath>
<path refid="classpath"/>
<pathelement location="test/classes"/>
</classpath>
<!--xmlfileset dir="${test14.dir}" includes="testng.xml"/-->
<classfileset dir="test" includes="classes/**/*.class"/>
</testng>
<fail if="failed" message="For results: open test/html/index.html" />
</target>
<!-- tested -->
<target name="cleantest" depends="bind" description="Clean up test directory">
<echo message="Cleaning tests..."/>
<delete includeemptydirs="true">
<fileset dir="test/classes" includes="**/*.class"/>
<fileset dir="test/output" includes="**/*.*"/>
<fileset dir="test/html" includes="**"/>
<fileset dir="test/html" includes="**/*.*"/>
</delete>
<!--delete dir="test/html/*"/-->
</target>
<!-- tested -->
<target name="javadoc" depends="versionnumber" description="Generate java documentation">
<echo message="Javadocing... ${version}"/>
<javadoc
destdir="javadoc"
author="true"
version="true"
encoding="iso8859-15"
Use="true" Splitindex="true" private="true"
Windowtitle="Alignment API and Server"
doctitle="Alignment API and Server ${version}"
header="Alignment API and Server ${version} (${svn.rev})"
bottom="(C) INRIA & friends, ${copyyear}"
>
<classpath refid="classpath"/>
<packageset dir="src" defaultexcludes="yes">
<include name="org/semanticweb/owl/align/**"/>
<include name="fr/inrialpes/**"/>
<include name="org/ivml/alimo/**"/>
<!--exclude name="org/semanticweb/owl/**"/-->
</packageset>
<!-- This works but the classpath is not set correctly -->
<!--packageset dir="plugins/neon/src" defaultexcludes="yes">
<include name="fr/inrialpes/**"/>
</packageset-->
<link href="http://java.sun.com/j2se/1.5.0/docs/api"/>
</javadoc>
</target>
<!-- tested -->
<target name="release" depends="versionnumber" description="Release a new version of the API">
<echo message="Releasing version ${version} (${svn.revision})" />
<!--echo message="Are you sure that everything is OK (update/ci/compile/lint)?"/-->
<copy file="distrib/LICENSE.TXT" tofile="LICENSE.TXT" filtering="true"/>
<antcall target="zip"/>
<!--copy file="${tempdir}/align-${version}.zip" tofile="${FTPDir}/align-${version}.zip" /-->
<!-- This should now go to GForge -->
<!--copy file="${FTPDir}/align-${version}.zip" tofile="${WebDir}/align.zip" /-->
<echo message="Please upload the released file to Gforge" />
<echo message="mv ${tempdir}/align-${version}.zip ${FTPDir}/" />
<echo message="svn copy svn+ssh://[email protected]/svn/alignapi/trunk svn+ssh://[email protected]/svn/alignapi/tags/version-${version} -m 'release ${version}'"/>
<delete file="LICENSE.TXT"/>
</target>
<!-- tested -->
<target name="zip" depends="bind" description="Generate zip file containing a release">
<echo message="Ziping..."/>
<antcall target="clean"/>
<!-- Unfortunately commit is not functional -->
<!--antcall target="commit"/-->
<antcall target="compileall"/>
<antcall target="jar"/>
<antcall target="test"/>
<antcall target="cleantest"/>
<antcall target="javadoc"/>
<ant dir="plugins/neon" target="jar">
<property name="version" value="${version}.${svn.revision}"/>
</ant>
<ant dir="plugins/android" target="jar">
<property name="version" value="${version}.${svn.revision}"/>
</ant>
<!-- may be useful to change directory -->
<zip zipfile="${tempdir}/align-${version}.zip">
<fileset dir=".">
<include name="**/*"/>
<exclude name="**/.svn"/>
<exclude name="plugins/neon/lib"/>
</fileset>
</zip>
</target>
<target name="svnCommit">
<property name="source-root" value="/usr/src"/>
<property name="repository.URL" value="http://sources.example.com"/>
<java classname="org.tmatesoft.svn.cli.SVN"
dir="${source-root}/TESTREPO" fork="true">
<arg value="commit"/>
<arg value="--username"/>
<arg value="admin"/>
<arg value="--password"/>
<arg value="admin"/>
<arg value="-m"/>
<arg value='"Testing"'/>
<arg value="${repository.URL}/TESTING"/>
<classpath>
<pathelement location="${antroot}/LIB/ganymed.jar" />
<pathelement location="${antroot}/LIB/javasvn.jar" />
<pathelement location="${antroot}/LIB/javasvn-cli.jar" />
</classpath>
</java>
</target>
<!-- This is for testing purposes, but has been found to work -->
<target name="status" depends="bind">
<java classname="org.tmatesoft.svn.cli.SVN" dir="." fork="true">
<arg value="status" />
<classpath refid="classpath"/>
</java>
</target>
<!-- not tested yet -->
<target name="update" depends="bind">
<java classname="org.tmatesoft.svn.cli.SVN" dir="." fork="true"
failonerror="true">
<sysproperty key="javasvn.ssh2.key"
value="/Volumes/Khata/.ssh/id_dsa" />
<!--sysproperty key="javasvn.ssh2.username" value="${login}" />
<sysproperty key="javasvn.ssh2.passphrase" value="aa" /-->
<arg value="update" />
<classpath refid="classpath"/>
</java>
</target>
<!-- not tested yet -->
<target name="commit" depends="update">
<java classname="org.tmatesoft.svn.cli.SVN" dir="." fork="true">
<arg value="commit" />
<arg value="--username" />
<arg value="${login}" />
<arg value="-m" />
<arg value='"Pre-release ${version}"' />
<classpath refid="classpath"/>
</java>
</target>
<!-- not tested yet -->
<target name="svnbranch" depends="">
<java classname="org.tmatesoft.svn.cli.SVN" dir="." fork="true">
<arg value="copy" />
<arg value="--username" />
<arg value="${login}" />
<arg value="${rep}/trunk" />
<arg value="${rep}/tags/version-${version}" />
<arg value="-m" />
<arg value='"Release ${version}"' />
<classpath refid="classpath"/>
</java>
</target>
<!-- tested -->
<macrodef name="onepom" description="utility macro for maven exporting">
<attribute name="file" description="Artifact name" />
<sequential>
<artifact:install file="lib/@{file}.jar">
<pom file="lib/@{file}.pom" />
<localRepository path="mvn-repo" />
</artifact:install>
</sequential>
</macrodef>
<!-- tested -->
<target name="mavenize" depends="bind" description="Creates a Maven local repositry">
<echo message="Mavenizing..."/>
<path id="maven-ant-tasks.classpath" path="${tooldir}/maven/maven-ant-tasks-2.1.3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
<delete dir="mvn-repo"/>
<mkdir dir="mvn-repo"/>
<!-- This would require ant-contrib -->
<!--for param="file">
<path>
<fileset dir="lib" includes="**/*.pom"/>
</path>
<echo message="@{file}" />
<onepom file="@{file}" />
</for-->
<onepom file="cli/commons-cli" />
<onepom file="hermit/hermit" />
<onepom file="iddl/iddl" />
<onepom file="jade/jade-http" />
<onepom file="jade/iiop" />
<onepom file="jade/jade" />
<onepom file="jdbc/mysql-connector-java" />
<onepom file="jdbc/postgresql-jdbc4" />
<onepom file="jena/arq" />
<onepom file="jena/iri" />
<onepom file="jena/jena" />
<onepom file="jetty/jetty-util" />
<onepom file="jetty/jetty" />
<onepom file="jwnl/jwnl" />
<onepom file="slf4j/slf4j-api" />
<onepom file="slf4j/jcl-over-slf4j" />
<onepom file="slf4j/log4j-over-slf4j" />
<onepom file="lucene/lucene-core" />
<onepom file="lucene/lucene-analyzers-common" />
<onepom file="lang/commons-lang3" />
<onepom file="ontosim/ontosim" />
<onepom file="osgi/osgi-core" />
<onepom file="owlapi10/api" />
<onepom file="owlapi10/impl" />
<onepom file="owlapi10/io" />
<onepom file="owlapi10/rdfapi" />
<onepom file="owlapi10/rdfparser" />
<onepom file="owlapi30/owlapi-bin" />
<onepom file="oyster/oyster" />
<onepom file="servlet/servlet-api" />
<onepom file="skosapi/skosapi" />
<onepom file="xerces/resolver" />
<onepom file="xerces/xercesImpl" />
<onepom file="xerces/xml-apis" />
<onepom file="align" />
<onepom file="ontowrap" />
<onepom file="procalign" />
<onepom file="alignsvc" />
</target>
<!-- tested -->
<target name="clean" description="Clean up the whole directory">
<echo message="Cleaning..."/>
<delete dir="tattletale" />
<antcall target="cleantest"/>
<ant dir="plugins/neon" target="clean" />
<ant dir="plugins/webcontent" target="clean" />
<ant dir="plugins/android" target="clean" />
<delete dir="examples/aligns"/>
<delete dir="mvn-repo"/>
<delete>
<fileset dir="classes" includes="**/*.class"/>
<fileset dir="examples" includes="**/*.class"/>
<fileset dir="examples/rdf" includes="*.rdf" excludes="newsample.rdf"/>
<fileset dir="examples/rdf" includes="*.tex"/>
<fileset dir="examples/omwg" includes="wine?.xml"/>
<fileset dir="examples" includes="**/*.jar"/>
<fileset dir="html/tutorial" includes="**/*.class"/>
</delete>
</target>
</project>