forked from liferay/liferay-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-common-plugin.xml
799 lines (683 loc) · 21.8 KB
/
build-common-plugin.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
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="build-common-plugin" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-common.xml" />
<property name="plugins.includes.path" value="${basedir}" />
<set-module-properties
module.dir="${basedir}"
/>
<macrodef name="build-service">
<attribute name="service.api.dir" />
<attribute name="service.auto.namespace.tables" default="true" />
<attribute name="service.hbm.file.name" default="portlet-hbm.xml" />
<attribute name="service.model.hints.file.name" default="portlet-model-hints.xml" />
<attribute name="service.props.util" default="com.liferay.util.service.ServiceProps" />
<attribute name="service.spring.file.name" default="portlet-spring.xml" />
<attribute name="service.sql.dir" />
<attribute name="service.test.dir" />
<sequential>
<if>
<available file="docroot" />
<then>
<var name="service.base.dir" value="docroot/WEB-INF" />
</then>
<else>
<var name="service.base.dir" value="." />
</else>
</if>
<if>
<available file="bnd.bnd" />
<then>
<var name="service.osgi.module" value="true" />
<var name="service.plugin.name" value="" />
<var name="service.spring.namespaces" value="beans,osgi" />
</then>
<else>
<var name="service.osgi.module" value="false" />
<var name="service.plugin.name" value="${plugin.name}" />
<var name="service.spring.namespaces" value="beans" />
</else>
</if>
<mkdir dir="@{service.api.dir}" />
<mkdir dir="@{service.sql.dir}" />
<mkdir dir="${service.base.dir}/classes" />
<mkdir dir="${service.base.dir}/lib" />
<mkdir dir="${service.base.dir}/src" />
<copy todir="${service.base.dir}/classes">
<fileset dir="${service.base.dir}/src" excludes="**/*.java" />
</copy>
<path id="service.classpath">
<path refid="lib.classpath" />
<path refid="portal.classpath" />
<fileset dir="${app.server.lib.portal.dir}" includes="commons-digester.jar,commons-lang.jar,easyconf.jar" />
<fileset dir="${service.base.dir}/lib" includes="*.jar" />
<pathelement location="${sdk.dir}/misc" />
<pathelement location="${service.base.dir}/classes" />
</path>
<if>
<os family="windows" />
<then>
<classpath-to-jar
classpathref="service.classpath"
jarfile="build-service-classpath.jar"
/>
</then>
</if>
<if>
<not>
<isset property="service.input.file" />
</not>
<then>
<property name="service.input.file" value="${basedir}/${service.base.dir}/service.xml" />
</then>
</if>
<java
classname="com.liferay.portal.tools.servicebuilder.ServiceBuilder"
classpathref="service.classpath"
fork="true"
newenvironment="true"
outputproperty="build-service.output"
>
<jvmarg value="-Xms512m" />
<jvmarg value="-Xmx1024m" />
<jvmarg value="-Xss2048k" />
<jvmarg value="-XX:MaxPermSize=512m" />
<arg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<arg value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger" />
<arg value="service.api.dir=@{service.api.dir}" />
<arg value="service.auto.namespace.tables=@{service.auto.namespace.tables}" />
<arg value="service.bean.locator.util=com.liferay.util.bean.PortletBeanLocatorUtil" />
<arg value="service.build.number=1" />
<arg value="service.build.number.increment=true" />
<arg value="service.hbm.file=${basedir}/${service.base.dir}/src/META-INF/@{service.hbm.file.name}" />
<arg value="service.impl.dir=${basedir}/${service.base.dir}/src" />
<arg value="service.input.file=${service.input.file}" />
<arg value="service.model.hints.file=${basedir}/${service.base.dir}/src/META-INF/@{service.model.hints.file.name}" />
<arg value="service.osgi.module=${service.osgi.module}" />
<arg value="service.plugin.name=${service.plugin.name}" />
<arg value="service.props.util=@{service.props.util}" />
<arg value="service.remoting.file=" />
<arg value="service.resources.dir=${basedir}/${service.base.dir}/src" />
<arg value="service.spring.file=${basedir}/${service.base.dir}/src/META-INF/@{service.spring.file.name}" />
<arg value="service.spring.namespaces=${service.spring.namespaces}" />
<arg value="service.sql.dir=@{service.sql.dir}" />
<arg value="service.sql.file=tables.sql" />
<arg value="service.sql.indexes.file=indexes.sql" />
<arg value="service.sql.sequences.file=sequences.sql" />
<arg value="service.target.entity.name=${service.target.entity.name}" />
<arg value="service.test.dir=@{service.test.dir}" />
</java>
<if>
<os family="windows" />
<then>
<delete file="build-service-classpath.jar" />
</then>
</if>
<delete file="ServiceBuilder.temp" />
<echo>${build-service.output}</echo>
<if>
<contains string="${build-service.output}" substring="Error" />
<then>
<fail>Service Builder generated exceptions.</fail>
</then>
</if>
</sequential>
</macrodef>
<macrodef name="classpath-to-jar">
<attribute name="classpathref" />
<attribute name="jarfile" />
<sequential>
<!--
Windows chokes if the classpath is longer than 32 kb. But the
workaround only works for Ant 1.8 and above. See LPS-29085.
-->
<if>
<and>
<not>
<contains string="${ant.version}" substring="1.6" />
</not>
<not>
<contains string="${ant.version}" substring="1.7" />
</not>
</and>
<then>
<manifestclasspath
jarfile="@{jarfile}"
maxParentLevels="99"
property="manifest.classpath"
>
<classpath refid="@{classpathref}" />
</manifestclasspath>
<manifest file="@{jarfile}.manifest">
<attribute name="Class-Path" value="${manifest.classpath}" />
</manifest>
<jar
destfile="@{jarfile}"
manifest="@{jarfile}.manifest"
/>
<delete file="@{jarfile}.manifest" />
<var name="manifest.classpath" unset="true" />
<path id="@{classpathref}">
<fileset file="@{jarfile}" />
</path>
</then>
</if>
</sequential>
</macrodef>
<target name="all">
<antcall target="clean" />
<antcall target="deploy" />
</target>
<target name="build-client">
<property name="client.url" value="http://localhost:8080/${plugin.name}/api/axis" />
<echo message="Make sure the server is listening on ${client.url}." />
<echo message="" />
<mkdir dir="docroot/WEB-INF/client/src" />
<java
classname="com.liferay.portal.tools.PortalClientBuilder"
classpathref="portal.classpath"
failonerror="true"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<arg value="docroot/WEB-INF/server-config.wsdd" />
<arg value="docroot/WEB-INF/client/src" />
<arg value="docroot/WEB-INF/client/namespace-mapping.properties" />
<arg value="${client.url}" />
</java>
<mkdir dir="docroot/WEB-INF/client/classes" />
<compile-java
javac.classpathref="portal.classpath"
javac.destdir="docroot/WEB-INF/client/classes"
javac.srcdir="docroot/WEB-INF/client/src"
/>
<zip destfile="docroot/WEB-INF/client/${plugin.name}-client.jar">
<fileset dir="docroot/WEB-INF/client/classes" />
<fileset dir="docroot/WEB-INF/client/src" />
</zip>
<delete dir="docroot/WEB-INF/client/classes" />
<delete dir="docroot/WEB-INF/client/src" />
</target>
<target name="build-db">
<java
classname="com.liferay.portal.tools.DBBuilder"
classpathref="portal.classpath"
fork="true"
maxmemory="384m"
newenvironment="true"
>
<arg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<arg value="db.database.name=${database.name}" />
<arg value="db.database.types=${database.types}" />
<arg value="db.sql.dir=docroot/WEB-INF/sql" />
</java>
<delete file="velocity.log" quiet="true" />
</target>
<target name="build-lang">
<if>
<available file="docroot/WEB-INF/src/content" />
<then>
<antcall target="build-lang-cmd">
<param name="lang.dir" value="docroot/WEB-INF/src/content" />
<param name="lang.file" value="Language" />
<param name="lang.translate" value="true" />
</antcall>
</then>
</if>
<if>
<available file="src/content" />
<then>
<antcall target="build-lang-cmd">
<param name="lang.dir" value="src/content" />
<param name="lang.file" value="Language" />
<param name="lang.translate" value="true" />
</antcall>
</then>
</if>
</target>
<target name="build-lang-cmd">
<java
classname="com.liferay.portal.tools.LangBuilder"
classpathref="portal.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<jvmarg value="-Dfile.encoding=UTF-8" />
<jvmarg value="-Duser.country=US" />
<jvmarg value="-Duser.language=en" />
<arg value="lang.dir=${lang.dir}" />
<arg value="lang.file=${lang.file}" />
<arg value="lang.plugin=true" />
<arg value="lang.translate=${lang.translate}" />
</java>
<copy file="${lang.dir}/${lang.file}.properties" tofile="${lang.dir}/${lang.file}_en.properties" />
</target>
<target name="build-service">
<if>
<available file="docroot" />
<then>
<var name="service.base.dir" value="docroot/WEB-INF" />
</then>
<else>
<var name="service.base.dir" value="." />
</else>
</if>
<build-service
service.api.dir="${basedir}/${service.base.dir}/service"
service.sql.dir="${basedir}/${service.base.dir}/sql"
service.test.dir=""
/>
<mkdir dir="${service.base.dir}/service-classes" />
<path id="service.classpath">
<path refid="lib.classpath" />
<fileset dir="${app.server.lib.global.dir}" includes="*.jar" />
<fileset dir="${sdk.dir}/dependencies/aQute.bnd/lib" includes="*.jar" />
<fileset dir="${service.base.dir}/lib" excludes="${plugin.name}-service.jar" includes="*.jar" />
</path>
<compile-java
javac.classpathref="service.classpath"
javac.destdir="${service.base.dir}/service-classes"
javac.srcdir="${service.base.dir}/service"
/>
<jar
basedir="${service.base.dir}/service-classes"
destfile="${service.base.dir}/lib/${plugin.name}-service.jar"
/>
<delete dir="${service.base.dir}/service-classes" />
</target>
<target name="build-wsdd">
<loop-macrodef-or-target
module.dirs="${basedir}"
target.name="compile"
/>
<path id="wsdd.classpath">
<path refid="lib.classpath" />
<path refid="portal.classpath" />
<fileset dir="docroot/WEB-INF/lib" includes="*.jar" />
<pathelement location="docroot/WEB-INF/classes" />
</path>
<if>
<os family="windows" />
<then>
<classpath-to-jar
classpathref="wsdd.classpath"
jarfile="build-wsdd-classpath.jar"
/>
</then>
</if>
<java
classname="com.liferay.portal.tools.WSDDBuilder"
classpathref="wsdd.classpath"
fork="true"
maxmemory="256m"
newenvironment="true"
outputproperty="build-wsdd.output"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<jvmarg value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger" />
<arg value="wsdd.input.file=docroot/WEB-INF/service.xml" />
<arg value="wsdd.server.config.file=docroot/WEB-INF/server-config.wsdd" />
<arg value="wsdd.service.namespace=Plugin" />
<arg value="wsdd.output.path=docroot/WEB-INF/src/" />
</java>
<if>
<os family="windows" />
<then>
<delete file="build-wsdd-classpath.jar" />
</then>
</if>
<echo>${build-wsdd.output}</echo>
<if>
<contains string="${build-wsdd.output}" substring="IOException" />
<then>
<fail>WSDD Builder generated exceptions.</fail>
</then>
</if>
</target>
<target name="build-wsdl">
<for param="wsdl.full.path">
<path>
<fileset dir="." includes="docroot/WEB-INF/wsdl/*.wsdl" />
</path>
<sequential>
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<mkdir dir="${tstamp.value}" />
<taskdef classpathref="portal.classpath" resource="axis-tasks.properties" />
<axis-wsdl2java
output="${tstamp.value}"
url="@{wsdl.full.path}"
/>
<compile-java
javac.classpathref="plugin.classpath"
javac.destdir="${tstamp.value}"
javac.srcdir="${tstamp.value}"
/>
<antelope:stringutil string="@{wsdl.full.path}" property="wsdl.name.beginindex">
<antelope:lastindexof string="${file.separator}" />
</antelope:stringutil>
<antelope:math
datatype="int"
operand1="${wsdl.name.beginindex}"
operand2="1"
operation="+"
result="wsdl.name.beginindex"
/>
<antelope:stringutil string="@{wsdl.full.path}" property="wsdl.file">
<antelope:substring beginindex="${wsdl.name.beginindex}" />
</antelope:stringutil>
<antelope:stringutil string="@{wsdl.full.path}" property="wsdl.name.endindex">
<antelope:lastindexof string="." />
</antelope:stringutil>
<antelope:stringutil string="@{wsdl.full.path}" property="wsdl.name">
<antelope:substring beginindex="${wsdl.name.beginindex}" endindex="${wsdl.name.endindex}" />
</antelope:stringutil>
<jar
basedir="${tstamp.value}"
jarfile="docroot/WEB-INF/lib/${wsdl.name}-ws.jar"
/>
<delete dir="${tstamp.value}" />
</sequential>
</for>
</target>
<target name="build-xsd">
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<mkdir dir="${tstamp.value}" />
<path id="plugin-lib.classpath">
<fileset dir="${app.server.lib.portal.dir}" includes="xbean.jar" />
<fileset dir="docroot/WEB-INF/lib" includes="*.jar" />
<pathelement location="docroot/WEB-INF/classes" />
</path>
<taskdef classname="org.apache.xmlbeans.impl.tool.XMLBean" classpathref="portal.classpath" name="xmlbean" />
<xmlbean
classgendir="${tstamp.value}"
classpathref="plugin-lib.classpath"
srcgendir="${tstamp.value}"
>
<fileset dir="docroot/WEB-INF/xsd" includes="**/*.*" />
</xmlbean>
<zip
basedir="${tstamp.value}"
destfile="docroot/WEB-INF/lib/${plugin.name}-xbean.jar"
/>
<delete dir="${tstamp.value}" />
</target>
<target name="compile-import-shared">
<compile-import-shared
module.dir="${basedir}"
/>
</target>
<target name="compile-jsp">
<antcall target="compile" />
<if>
<not>
<equals arg1="${app.server.type}" arg2="tomcat" />
</not>
<then>
<fail>Compiling JSPs with ${app.server.type} is not supported.</fail>
</then>
</if>
<property name="jspc.classes.dir" value="classes/${app.server.type}" />
<if>
<and>
<equals arg1="${app.server.type}" arg2="tomcat" />
<equals arg1="${ant.java.version}" arg2="1.5" />
</and>
<then>
<var name="jspc.java.home" value="${jdk.windows.home}" />
</then>
<else>
<var name="jspc.java.home" value="${env.JAVA_HOME}" />
</else>
</if>
<path id="jspc.classpath">
<pathelement location="${jspc.java.home}/jre/lib/rt.jar" />
<fileset dir="${app.server.lib.global.dir}" includes="*.jar" />
<pathelement location="${app.server.lib.portal.dir}/ant.jar" />
<pathelement location="docroot/WEB-INF/classes" />
<fileset dir="docroot/WEB-INF/lib" includes="*.jar" />
<pathelement location="${app.server.dir}/bin/tomcat-juli.jar" />
<pathelement location="${app.server.dir}/lib/el-api.jar" />
<pathelement location="${app.server.dir}/lib/jasper.jar" />
<pathelement location="${app.server.dir}/lib/jasper-el.jar" />
<pathelement location="${app.server.dir}/lib/jasper-jdt.jar" />
<pathelement location="${app.server.dir}/lib/jsp-api.jar" />
<pathelement location="${app.server.dir}/lib/servlet-api.jar" />
<pathelement location="${app.server.dir}/lib/tomcat-api.jar" />
<pathelement location="${app.server.dir}/lib/tomcat-util.jar" />
</path>
<delete dir="${jspc.classes.dir}" quiet="true" />
<java
classname="org.apache.jasper.JspC"
classpathref="jspc.classpath"
fork="true"
jvm="${jspc.java.home}/bin/java"
newenvironment="true"
outputproperty="jspc.output"
>
<arg line="-d ${jspc.classes.dir} -webapp docroot" />
</java>
<echo>${jspc.output}</echo>
<if>
<contains string="${jspc.output}" substring="JasperException" />
<then>
<delete dir="${jspc.classes.dir}" quiet="true" />
<fail>JSPs failed to compile.</fail>
</then>
</if>
<javac
classpathref="jspc.classpath"
compiler="${javac.compiler}"
deprecation="${javac.deprecation}"
destdir="${jspc.classes.dir}"
encoding="${javac.encoding}"
errorProperty="jspc.javac.fail"
failonerror="false"
includeAntRuntime="false"
nowarn="on"
srcdir="${jspc.classes.dir}"
/>
<delete dir="${jspc.classes.dir}" quiet="true" />
<if>
<istrue value="${jspc.javac.fail}"/>
<then>
<fail>JSPs failed to compile.</fail>
</then>
</if>
</target>
<target name="compile-test">
<compile-test
module.dir="${basedir}"
/>
</target>
<target name="compile-test-integration">
<compile-test-integration
module.dir="${basedir}"
/>
</target>
<target name="compile-test-unit">
<compile-test-unit
module.dir="${basedir}"
/>
</target>
<target name="format-wsdl">
<for param="wsdl.full.path">
<path>
<fileset
dir="."
includes="docroot/WEB-INF/wsdl/*.wsdl,docroot/WEB-INF/wsdl/**/*.wsdl"
/>
</path>
<sequential>
<java
classname="com.liferay.portal.tools.XMLFormatter"
classpathref="portal.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<jvmarg value="-Dxml.formatter.file=@{wsdl.full.path}" />
<jvmarg value="-Dxml.formatter.strip.comments=true" />
</java>
</sequential>
</for>
</target>
<target name="format-xsd">
<for param="xsd.full.path">
<path>
<fileset
dir="."
includes="docroot/WEB-INF/xsd/*.xsd,docroot/WEB-INF/xsd/**/*.xsd"
/>
</path>
<sequential>
<java
classname="com.liferay.portal.tools.XMLFormatter"
classpathref="portal.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<jvmarg value="-Dxml.formatter.file=@{xsd.full.path}" />
<jvmarg value="-Dxml.formatter.strip.comments=true" />
</java>
</sequential>
</for>
</target>
<target name="jar-javadoc" depends="javadoc">
<jar-javadoc
module.dir="${basedir}"
/>
</target>
<target name="jar-source">
<jar-source
module.dir="${basedir}"
/>
</target>
<target name="javadoc">
<javadoc-macro
module.dir="${basedir}"
/>
</target>
<target name="merge">
<merge
module.dir="${basedir}"
/>
</target>
<target name="merge-unzip">
<merge-unzip
module.dir="${basedir}"
/>
</target>
<target name="patch">
<var name="patched.file.available" value="false" />
<for param="patched.file">
<path>
<fileset
dir="${plugin.source.dir}"
includes="${patch.destination}"
/>
</path>
<sequential>
<var name="patched.file.available" value="true" />
</sequential>
</for>
<if>
<equals arg1="${patched.file.available}" arg2="false" />
<then>
<get
dest="${patch.original.lib.name}-sources.jar"
src="${patch.original.lib.url}/${patch.original.lib.name}/${patch.original.lib.version}/${patch.original.lib.name}-${patch.original.lib.version}-sources.jar"
/>
<unjar
dest="${plugin.source.dir}"
src="${patch.original.lib.name}-sources.jar"
>
<mapper
type="glob"
from="src/java/*"
to="*"
/>
<patternset includes="${patch.destination}" />
</unjar>
<delete file="${patch.original.lib.name}-sources.jar" />
<if>
<available file="${patch.source}" type="dir" />
<then>
<pathconvert property="patch.files">
<path>
<fileset dir="${patch.source}" />
</path>
</pathconvert>
</then>
<else>
<pathconvert property="patch.files">
<path>
<fileset file="${patch.source}" />
</path>
</pathconvert>
</else>
</if>
<for delimiter=":" list="${patch.files}" param="patch.file">
<sequential>
<echo>Applying patch @{patch.file}.</echo>
<patch dir="${plugin.source.dir}" patchfile="@{patch.file}" strip="1" />
</sequential>
</for>
</then>
</if>
<var name="patched.file.available" unset="true" />
</target>
<target name="publish-local-m2-release" depends="jar-javadoc,jar-source,war">
<antcall target="build-common-ivy.publish">
<param name="ivy.publish.resolver" value="local-m2" />
</antcall>
</target>
<target name="publish-local-m2-snapshot" depends="jar-javadoc,jar-source,war">
<antcall target="build-common-ivy.publish">
<param name="ivy.publish.resolver" value="local-m2" />
<param name="plugin.release.qualifier" value="-SNAPSHOT" />
</antcall>
</target>
<target name="publish-remote-m2-release" depends="jar-javadoc,jar-source,war">
<antcall target="build-common-ivy.publish">
<param name="ivy.publish.resolver" value="sonatype-m2-release" />
</antcall>
</target>
<target name="publish-remote-m2-snapshot" depends="jar-javadoc,jar-source,war">
<antcall target="build-common-ivy.publish">
<param name="ivy.publish.resolver" value="sonatype-m2-snapshot" />
<param name="plugin.release.qualifier" value="-SNAPSHOT" />
</antcall>
</target>
<target name="shrink-zip-cmd">
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<unzip
dest="${tstamp.value}"
src="${zip.file.name}"
>
<patternset
excludes="${zip.excludes}"
includes="${zip.includes}"
/>
</unzip>
<zip
basedir="${tstamp.value}"
destfile="${zip.file.name}"
/>
<delete dir="${tstamp.value}" />
</target>
<target name="test-class">
<test-class
module.dir="${basedir}"
test.class="${test.class}"
/>
</target>
</project>