forked from WISE-Community/WISE-Portal--Deprecated--
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
471 lines (417 loc) · 23.7 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Copyright (c) 2006 Encore Research Group, University of Toronto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-->
<!-- $Id$ -->
<project name="sail-webapp" default="echo" basedir=".">
<description>
Build file for using Hibernate Tools for database schema generation.
</description>
<property file="build.properties" />
<path id="lib.servlet-api">
<path location="${M2_REPO}/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar" />
</path>
<path id="lib.jdbc">
<path location="${M2_REPO}/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar" />
<path location="${M2_REPO}/com/h2database/h2/1.0.20070429/h2-1.0.20070429.jar" />
<path location="${M2_REPO}/mysql/mysql-connector-java/5.0.5/mysql-connector-java-5.0.5.jar" />
</path>
<path id="lib.roolo">
<path location="${M2_REPO}/elo-api/elo-api/0.1.0-SNAPSHOT/elo-api-0.1.0-SNAPSHOT.jar" />
<path location="${M2_REPO}/elo-impl/elo-impl/0.1.0-SNAPSHOT/elo-impl-0.1.0-SNAPSHOT.jar" />
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-core/1.4/jackrabbit-core-1.4.jar" />
<path location="${M2_REPO}/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar"/>
<path location="${M2_REPO}/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar"/>
<path location="${M2_REPO}/commons-collections/commons-collections/3.2/commons-collections-3.2.jar"/>
<path location="${M2_REPO}/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"/>
<path location="${M2_REPO}/org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-core/1.4/jackrabbit-core-1.4.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-api/1.4/jackrabbit-api-1.4.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-classloader/1.4/jackrabbit-classloader-1.4.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-jcr-commons/1.4/jackrabbit-jcr-commons-1.4.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-jcr-rmi/1.4/jackrabbit-jcr-rmi-1.4.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-jcr-tests/1.4/jackrabbit-jcr-tests-1.4.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-ocm/1.4/jackrabbit-ocm-1.4.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-ocm/1.4/jackrabbit-ocm-1.4-jdk14.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-ocm-nodemanagement/1.4/jackrabbit-ocm-nodemanagement-1.4.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-spi/1.4/jackrabbit-spi-1.4.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-spi-commons/1.4/jackrabbit-spi-commons-1.4.jar"/>
<path location="${M2_REPO}/org/apache/jackrabbit/jackrabbit-text-extractors/1.4/jackrabbit-text-extractors-1.4.jar"/>
<path location="${M2_REPO}/javax/jcr/jcr/1.0/jcr-1.0.jar"/>
<path location="${M2_REPO}/org/jcrom/jcrom/1.3.2/jcrom-1.3.2.jar"/>
<path location="${M2_REPO}/org/apache/lucene/lucene-core/2.2.0/lucene-core-2.2.0.jar"/>
<path location="${M2_REPO}/pdfbox/pdfbox/0.7.3/pdfbox-0.7.3.jar"/>
<path location="${M2_REPO}/org/apache/poi/poi/3.0.2-FINAL/poi-3.0.2-FINAL.jar"/>
<path location="${M2_REPO}/org/slf4j/slf4j-api/1.4.2/slf4j-api-1.4.2.jar"/>
<path location="${M2_REPO}/org/textmining/tm-extractors/0.4/tm-extractors-0.4.jar"/>
<path location="${M2_REPO}/org/slf4j/slf4j-log4j12/1.4.3/slf4j-log4j12-1.4.3.jar" />
<path location="${M2_REPO}/log4j/log4j/1.2.13/log4j-1.2.13.jar" />
<path location="${M2_REPO}/axis/axis-jaxrpc/1.4/axis-jaxrpc-1.4.jar" />
<path location="${M2_REPO}/commons-discovery/commons-discovery/0.2/commons-discovery-0.2.jar" />
<path location="${M2_REPO}/axis/axis/1.4/axis-1.4.jar"/>
<path location="${M2_REPO}/axis/axis-saaj/1.4/axis-saaj-1.4.jar"/>
<path location="${M2_REPO}/axis/axis-wsdl4j/1.5.1/axis-wsdl4j-1.5.1.jar" />
</path>
<path id="lib.commons-logging">
<path location="${M2_REPO}/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" />
</path>
<path id="lib.commons-fileupload">
<path location="${M2_REPO}/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar" />
</path>
<path id="lib.commons-dbcp">
<path location="${M2_REPO}/commons-dbcp/commons-dbcp/1.2.1/commons-dbcp-1.2.1.jar" />
<path location="${M2_REPO}/commons-pool/commons-pool/1.2/commons-pool-1.2.jar" />
</path>
<path id="lib.commons-collections">
<path location="${M2_REPO}/commons-collections/commons-collections/3.2/commons-collections-3.2.jar" />
</path>
<path id="lib.dom4j">
<path location="${M2_REPO}/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" />
</path>
<!--
<path id="lib.acegi-security">
<path location="${M2_REPO}/org/telscenter/external/org/acegisecurity/acegi-security/1.0.4-SNAPSHOT/acegi-security-1.0.4-SNAPSHOT.jar" />
<path location="${M2_REPO}/org/acegisecurity/acegi-security-tiger/1.0.4/acegi-security-tiger-1.0.4.jar" />
</path>
-->
<path id="lib.hibernate">
<path location="${M2_REPO}/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar" />
<path location="${M2_REPO}/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar" />
<path location="${M2_REPO}/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar"/>
<path location="${M2_REPO}/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" />
<path location="${M2_REPO}/antlr/antlr/2.7.6/antlr-2.7.6.jar" />
</path>
<path id="lib.jta">
<path location="${M2_REPO}/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar" />
</path>
<path id="lib.spring">
<path location="${M2_REPO}/org/springframework/spring-aspects/2.5.6/spring-aspects-2.5.6.jar" />
<path location="${M2_REPO}/org/springframework/spring-context/2.5.6/spring-context-2.5.6.jar" />
<path location="${M2_REPO}/org/springframework/spring-beans/2.5.6/spring-beans-2.5.6.jar" />
<path location="${M2_REPO}/org/springframework/spring-web/2.5.6/spring-web-2.5.6.jar" />
<path location="${M2_REPO}/org/springframework/spring-webmvc/2.5.6/spring-webmvc-2.5.6.jar" />
<path location="${M2_REPO}/org/springframework/spring-core/2.5.6/spring-core-2.5.6.jar" />
<path location="${M2_REPO}/org/springframework/spring/2.5.6/spring-2.5.6.jar" />
<path location="${M2_REPO}/org/springframework/spring-aop/2.5.6/spring-aop-2.5.6.jar" />
<path location="${M2_REPO}/org/springframework/spring-orm/2.5.6/spring-orm-2.5.6.jar" />
<path location="${M2_REPO}/org/springframework/security/spring-security-core/2.0.4/spring-security-core-2.0.4.jar" />
<path location="${M2_REPO}/org/springframework/security/spring-security-taglibs/2.0.4/spring-security-taglibs-2.0.4.jar" />
<path location="${M2_REPO}/org/springframework/security/spring-security-core/2.0.4/spring-security-core-2.0.4-tests.jar" />
<path location="${M2_REPO}/org/springframework/security/spring-security-core-tiger/2.0.4/spring-security-core-tiger-2.0.4.jar" />
<path location="${M2_REPO}/org/springframework/security/spring-security-acl/2.0.4/spring-security-acl-2.0.4.jar" />
<path location="${M2_REPO}/quartz/quartz/1.5.1/quartz-1.5.1.jar" />
</path>
<path id="lib.ehcache">
<path location="${M2_REPO}/net/sf/ehcache/ehcache/1.3.0/ehcache-1.3.0.jar" />
</path>
<path id="lib.cglib">
<path location="${M2_REPO}/cglib/cglib/2.1_3/cglib-2.1_3.jar" />
<path location="${M2_REPO}/asm/asm/1.5.3/asm-1.5.3.jar" />
</path>
<path id="lib.commons-codec">
<path location="${M2_REPO}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar" />
</path>
<path id="lib.commons-httpclient">
<path location="${M2_REPO}/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar" />
<path refid="lib.commons-codec" />
</path>
<path id="lib.jdom">
<path location="${M2_REPO}/jdom/jdom/1.0/jdom-1.0.jar" />
</path>
<path id="lib.javamail">
<path location="${M2_REPO}/javax/activation/activation/1.1/activation-1.1.jar" />
<path location="${M2_REPO}/javax/mail/mail/1.4/mail-1.4.jar" />
</path>
<path id="lib.sail">
<path location="${M2_REPO}/net/sf/sail/sail-data-emf/0.1.0-SNAPSHOT/sail-data-emf-0.1.0-SNAPSHOT.jar" />
<path location="${M2_REPO}/org/eclipse/emf/ecore/2.2.0/ecore-2.2.0.jar" />
<path location="${M2_REPO}/org/eclipse/emf/common/2.2.0/common-2.2.0.jar" />
<path location="${M2_REPO}/org/telscenter/pas-curnitmap/0.1.0-SNAPSHOT/pas-curnitmap-0.1.0-SNAPSHOT.jar" />
<path location="${M2_REPO}/net/sf/sail/qti-bindings/2.0-SNAPSHOT/qti-bindings-2.0-SNAPSHOT.jar" />
<path location="${M2_REPO}/javax/xml/bind/jaxb-api/2.0/jaxb-api-2.0.jar" />
<path location="${M2_REPO}/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar" />
<path location="${M2_REPO}/com/sun/xml/bind/jaxb-impl/2.0.3/jaxb-impl-2.0.3.jar" />
</path>
<path id="lib.aspect">
<path location="${M2_REPO}/aspectj/aspectjrt/1.5.3/aspectjrt-1.5.3.jar" />
</path>
<path id="lib.dwr">
<path location="${M2_REPO}/org/directwebremoting/dwr/2.0.1/dwr-2.0.1.jar" />
</path>
<path id="lib.recaptcha">
<path location="${M2_REPO}/net/tanesha/recaptcha4j/recaptcha4j/0.0.7/recaptcha4j-0.0.7.jar" />
</path>
<path id="lib.poi">
<path location="${M2_REPO}/org/apache/poi/poi/3.7/poi-3.7.jar" />
<path location="${M2_REPO}/org/apache/poi/poi-ooxml/3.7/poi-ooxml-3.7.jar" />
<path location="${M2_REPO}/org/apache/poi/poi-ooxml-schemas/3.7/poi-ooxml-schemas-3.7.jar" />
</path>
<path id="lib.xmlbeans">
<path location="${M2_REPO}/org/apache/xmlbeans/xmlbeans/2.4.0/xmlbeans-2.4.0.jar" />
</path>
<path id="classes">
<path location="${dir.build.classes}" />
</path>
<path id="runtime.classpath">
<path refid="lib.servlet-api" />
<path refid="lib.jdbc" />
<path refid="lib.roolo" />
<path refid="lib.commons-dbcp" />
<path refid="lib.commons-collections" />
<path refid="lib.commons-logging" />
<path refid="lib.commons-fileupload" />
<path refid="lib.commons-httpclient" />
<path refid="lib.hibernate" />
<path refid="lib.dom4j" />
<path refid="lib.spring" />
<path refid="lib.jta" />
<path refid="lib.cglib" />
<path refid="lib.ehcache" />
<!-- <path refid="lib.acegi-security" /> -->
<path refid="lib.jdom" />
<path refid="lib.javamail" />
<path refid="lib.sail" />
<path refid="lib.aspect" />
<path refid="lib.dwr" />
<path refid="lib.recaptcha" />
<path refid="lib.poi" />
<path refid="lib.xmlbeans" />
<path refid="classes" />
</path>
<!-- =================================
target: db.schema-export
================================= -->
<target name="db.schema-export" depends="_set.properties.jdbc" description="Generate the database schema from annotated persistent classes in the production code.">
<property name="portal.config" value="tels"/>
<!--
<antcall target="_mvn.recompile"/>
-->
<replace file="${basedir}/target/classes/hibernate.properties" token="org.hibernate.dialect.HSQLDialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
<java classname="net.sf.sail.webapp.DbSchemaExporter" fork="true" failonerror="true" newenvironment="true">
<arg value="org.telscenter.sail.webapp.spring.impl.SpringConfigurationImpl" />
<arg value="${dir.src.main.resources}/tels/wise4-createtables.sql" />
<classpath refid="runtime.classpath" />
</java>
<replace file="${dir.src.main.resources}/tels/wise4-createtables.sql" token="type=MyISAM" value="engine=MyISAM"/>
</target>
<target name="db.schema-export-old" description="Generate the database schema from annotated persistent classes in the production code.">
<property name="portal.config" value="tels"/>
<!--
<antcall target="_mvn.recompile"/>
-->
<mkdir dir="${dir.src.db}/hsqldb"/>
<mkdir dir="${dir.src.db}/mysql"/>
<replace file="${basedir}/target/classes/hibernate.properties" token="org.hibernate.dialect.MySQLInnoDBDialect" value="org.hibernate.dialect.HSQLDialect"/>
<java classname="net.sf.sail.webapp.DbSchemaExporter" fork="true" failonerror="true" newenvironment="true">
<arg value="net.sf.sail.webapp.spring.impl.SpringConfigurationImpl" />
<arg value="${dir.src.db}/hsqldb/hibernate-pas.sql" />
<classpath refid="runtime.classpath" />
</java>
<java classname="net.sf.sail.webapp.DbSchemaExporter" fork="true" failonerror="true" newenvironment="true">
<arg value="org.telscenter.sail.webapp.spring.impl.SpringConfigurationImpl" />
<arg value="${dir.src.db}/hsqldb/hibernate-tels.sql" />
<classpath refid="runtime.classpath" />
</java>
<replace file="${basedir}/target/classes/hibernate.properties" token="org.hibernate.dialect.HSQLDialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
<java classname="net.sf.sail.webapp.DbSchemaExporter" fork="true" failonerror="true" newenvironment="true">
<arg value="net.sf.sail.webapp.spring.impl.SpringConfigurationImpl" />
<arg value="${dir.src.db}/mysql/hibernate-pas.sql" />
<classpath refid="runtime.classpath" />
</java>
<java classname="net.sf.sail.webapp.DbSchemaExporter" fork="true" failonerror="true" newenvironment="true">
<arg value="org.telscenter.sail.webapp.spring.impl.SpringConfigurationImpl" />
<arg value="${dir.src.db}/mysql/hibernate-tels.sql" />
<classpath refid="runtime.classpath" />
</java>
</target>
<target name="db.migrate" depends="_set.properties.jdbc, _input.portal.config" description="Generate the database schema from annotated persistent classes in the production code.">
<property name="portal.config" value="tels"/>
<antcall target="_mvn.recompile"/>
<java classname="${dbmigration.classname}" fork="true" failonerror="true" newenvironment="true">
<arg value="${portal.config}"/>
<arg value="${settings.profiles.profile.properties.jdbc.driverClassName}"/>
<arg value="${settings.profiles.profile.properties.jdbc.url}" />
<arg value="${settings.profiles.profile.properties.jdbc.username}"/>
<arg value="${settings.profiles.profile.properties.jdbc.password}"/>
<classpath refid="runtime.classpath" />
</java>
</target>
<!-- =================================
target: db.create
================================= -->
<target name="db.create" depends="_set.properties.jdbc, _input.portal.config" description="Create a production database with table structure only. No initial data inserted.">
<!-- determine the database directory and files and delete them first -->
<tempfile property="temp.file" prefix="temp" suffix=".properties" />
<propertyfile file="${temp.file}">
<entry key="db.directory" value="${settings.profiles.profile.properties.jdbc.url}" />
<entry key="db.prefix" value="${settings.profiles.profile.properties.jdbc.url}" />
</propertyfile>
<replaceregexp file="${temp.file}">
<regexp pattern="=jdbc\\:hsqldb\\:file\\:(.*)/(.*);shutdown\\=true" />
<substitution expression="=\1" />
</replaceregexp>
<replaceregexp file="${temp.file}">
<regexp pattern="=jdbc\\:hsqldb\\:file\\:.*/(.*);shutdown\\=true" />
<substitution expression="=\1" />
</replaceregexp>
<property file="${temp.file}" />
<delete quiet="true" includeemptydirs="true">
<fileset dir="${db.directory}" includes="**/${db.prefix}*" />
</delete>
<propertyfile file="${temp.file}">
<entry key="db.directory" value="${settings.profiles.profile.properties.db.directory}" />
<entry key="db.prefix" value="${settings.profiles.profile.properties.db.prefix}" />
</propertyfile>
<delete quiet="true" includeemptydirs="true">
<fileset dir="${db.directory}" includes="**/${db.prefix}*" />
<fileset file="${temp.file}"/>
</delete>
<antcall target="_mysql.recreate"/>
<sql driver="${settings.profiles.profile.properties.jdbc.driverClassName}" url="${settings.profiles.profile.properties.jdbc.url}" userid="${settings.profiles.profile.properties.jdbc.username}" password="${settings.profiles.profile.properties.jdbc.password}" src="${dir.src.db}/${settings.profiles.profile.properties.db.vendor}/${schema.export.filename}" autocommit="false" onerror="abort" classpathref="lib.jdbc" />
</target>
<target name="_mysql.check">
<condition property="mysql.recreate">
<equals arg1="${settings.profiles.profile.properties.db.vendor}" arg2="mysql" trim="true"/>
</condition>
</target>
<target name="_mysql.recreate" depends="_mysql.check" if="mysql.recreate">
<exec osfamily="Unix" executable="/bin/sh">
<arg value="./mysql-init.sh"/>
</exec>
<exec osfamily="Winnt" executable="cmd">
<arg value="/c"/>
<arg value="mysql-init.bat"/>
</exec>
</target>
<!-- =================================
target: db.init
================================= -->
<target name="db.init" depends="_set.properties.jdbc, _input.portal.config" description="Initialize a production database with user role and default administrator account.">
<java classname="${init.classname}" fork="true" failonerror="true" newenvironment="true">
<arg value="${settings.profiles.profile.properties.context.config.class}" />
<classpath refid="runtime.classpath" />
</java>
</target>
<!-- =================================
target: create.default.otml.curnits
================================= -->
<target name="create.default.otml.curnits" depends="" description="Adds otml curnits to the local repository.">
<java classname="org.telscenter.sail.webapp.CreateDefaultOtmlCurnits" fork="true" failonerror="true" newenvironment="true">
<classpath refid="runtime.classpath" />
</java>
</target>
<!-- =================================
target: create.default.roolo.enlace.curnits
================================= -->
<target name="create.default.roolo.enlace.curnits" depends="" description="Adds otml curnits to the local repository.">
<java classname="org.telscenter.sail.webapp.CreateDefaultRooloLOROtmlCurnits" fork="true" failonerror="true" newenvironment="true">
<classpath refid="runtime.classpath" />
</java>
</target>
<!-- =================================
internal target
================================= -->
<target name="_input.portal.config">
<input message="Portal configuration?" validargs="pas,tels" addproperty="portal.config" defaultvalue="pas" />
<property file="build-${portal.config}.properties" />
</target>
<!-- =================================
internal target
================================= -->
<target name="_verify.version.ant">
<condition property="ant-is-at-least-version">
<antversion atleast="${ant.version.min}" />
</condition>
<fail unless="ant-is-at-least-version" status="1">
Ant needs to be at least version ${ant.version.min}+, please update your installation.
</fail>
</target>
<!-- =================================
internal target: _input.skip.test. Allows users to choose if they want to run the tests or not after compiling code.
================================= -->
<target name="_input.skip.test" depends="_verify.version.ant">
<input message="Do you want to skip the unit tests? (not recommended)" validargs="yes,no" addproperty="skip.tests.yes.no" defaultvalue="no" />
<condition property="skip.tests">
</condition>
</target>
<!-- =================================
internal target
================================= -->
<target name="_verify.run.test">
<condition property="skip.tests">
</condition>
</target>
<!-- =================================
internal target: _mvn.compile. Clean, test, resources:resources
================================= -->
<target name="_mvn.compile" depends="_verify.version.ant, _input.skip.test" unless="skip.tests">
<!-- this should work in Linux, Mac OS X, and other Unix-like OS -->
<exec osfamily="Unix" executable="mvn" failonerror="true" failifexecutionfails="true">
<arg value="clean" />
<arg value="test" />
<arg value="resources:resources" />
</exec>
<!-- this should work for Microsoft Windows NT-based systems, including Windows 2000, XP and successors -->
<exec osfamily="Winnt" executable="cmd" failonerror="true" failifexecutionfails="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="clean" />
<arg value="test" />
<arg value="resources:resources" />
</exec>
</target>
<!-- =================================
internal target: _mvn.recompile. Clean, compile, resources:resources
================================= -->
<target name="_mvn.recompile" depends="_verify.version.ant">
<!-- this should work in Linux, Mac OS X, and other Unix-like OS -->
<exec osfamily="Unix" executable="mvn" failonerror="true" failifexecutionfails="true">
<arg value="clean" />
<arg value="compile" />
<arg value="resources:resources" />
</exec>
<!-- this should work for Microsoft Windows NT-based systems, including Windows 2000, XP and successors -->
<exec osfamily="Winnt" executable="cmd" failonerror="true" failifexecutionfails="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="clean" />
<arg value="compile" />
<arg value="resources:resources" />
</exec>
</target>
<!-- =================================
internal target
================================= -->
<target name="_set.properties.jdbc">
<!--
For some reason, an empty string in the maven settings.xml file is discard from the XML parsed properties.
The password is currently hard-coded in build.properties as an empty string for use with HSQLDB only!
When switching to another database, the password needs to be set accordingly.
The best way to set the password would be to extract it from settings.xml like the driverClassName, etc.
-->
<xmlproperty file="${user.home}/.m2/settings.xml" semanticAttributes="true" />
</target>
<!-- =================================
target: echo
================================= -->
<target name="echo" description="Echo some useful usage information.">
<echo>
To get a list of all available targets,
use "ant -projecthelp".
</echo>
</target>
</project>