-
Notifications
You must be signed in to change notification settings - Fork 3
/
antbuild.xml
1796 lines (1705 loc) · 104 KB
/
antbuild.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
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--
Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0,
or the Eclipse Distribution License v. 1.0 which is available at
http://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-->
<!--
Contributors:
tware - initial API and implementation
pkrogh - javadocs
egwin - rework to follow ant conventions.
dtwelves - Add SDO, MOXy SRG targets
egwin - rework to incorporate new versioning standards and revision info.
egwin - add jpa 2.0 jar creation, and JPA 1.1/2.0 concurrent development
strategy. Also includes fixes to eclipselink.jar creation.
egwin - rework to standardize antcall conventions and fix multiple target builds.
tkraus - additional JDK, Ant and JDBC driver check, conditional Oracle extensions tests build
mvalovy - OSGi tests
Rick Curtis - Add jse bucket to lrg-test
-->
<!-- =============================================================================
* General Comments
* This buildfile contains:
* - calls to the component builds to clean, compile, package and test thier bits
* - calls to initiate component tests
* - targets to package the eclipselink jar
* - targets to generate the eclipselink installer
* - targets to generate the javadocs
* Used standalone it can generate Developer Builds of the entire product or subsets
* of the product.
* When called by autobuild it generates Nightly and Milestone builds
*================================================================================= -->
<!-- This ant project includes the following tasks:
- build (default) : compiles all components and tests
Oracle is included when Oracle JDBC driver is set and dependency chek passes
- build.all : compiles all components and tests, including Oracle extensions
- build-eclipselink-jar : compiles all components except tests, packages eclipselink.jar
- clean : removes all build generated files
- clean-runtime : removes all runtime specific (product) build generated files (calls both clean-runtime-checkedin and clean-runtime-built)
- clean-runtime-checkedin : removes all runtime specific (product) build generated files, that are part of the svn repository (checked in with build)
- clean-runtime-built : removes all runtime specific (product) files generated during the build, but that are NOT checked in
- clean-testing : removes all testing specific build generated files
- build-distribution : compiles and packages all jars, javadocs, installer
- build-core : compiles all components, excluding tests, utilities, and Oracle extensions
- build-oracle : compiles Oracle extensions and tests
- build-test : compiles all tests, excluding Oracle extensions
- build-workbench-test : compiles the workbench tests
- package-eclipselink-jar : packages eclipselink.jar
- jar : packages eclipselink.jar
- package-src-jar : packages source jar
- build-javadocs : generates Javadocs
- package-installer-zip : builds installer
- package-package-renamer.jar : builds packages renamer jar
- test-srg : runs all Short ReGression test suites
- test-lrg : runs all Long ReGression test suites
- test-core : runs core tests
- test-core-srg : runs core SRG
- test-jpa : runs JPA tests
- test-jpa-jse : runs JPA JSE tests
- test-moxy : runs MOXY tests
- test-moxy-srg : runs MOXY SRG
- test-jaxb : runs MOXY jaxb tests
- test-oxm : runs MOXY oxm tests
- test-sdo : runs SDO tests
- test-sdo-srg : runs SDO SRG
It may require some configuration of the build.properties to run.
-->
<!--
* Ant naming conventions:
* - regardless of the actual OS platform,'/' is the directory separator
* (Ant will convert as appropriate).
* - multi-word properties use periods '.'
* - properties ending in .jar define jarfile names only (no path)
* - properties ending in .lib are fully qualified jars (path and filename)
* - properties ending in .dir are directory paths
* - properties ending in .path are path refid names (classpath fragments)
* - multi-word targets use hyphens '-'
* - targets beginning with test- are reserved for high level test targets,
* and are used in test results parsing
* - targets typically use the form <action>-<object>-<type> (ie. package-bundle-zip)
* - multi-word macros use underscores '_'
* - multi-word macro attributes are concatenated
* e.g. 'runpathref'
* - multi-word tasks (taskdef) names are concatenated
* e.g. 'validateconnection'
* - OS environment variables are in ALLCAPS and have 'env' as a prefix
* e.g. ${env.XXX}.
* - Ant properties are lower case.
-->
<project name="trunk" default="build" basedir="." xmlns:jacoco="antlib:org.jacoco.ant" xmlns:sonar="antlib:org.sonar.ant">
<dirname property="trunk.build.location_temp" file="${ant.file.trunk}"/>
<pathconvert targetos="unix" property="trunk.build.location">
<path>
<pathelement location="${trunk.build.location_temp}"/>
</path>
</pathconvert>
<echo message="trunk.build.location = '${trunk.build.location}'"/>
<property environment="env"/>
<echo message="env.CLASSPATH = '${env.CLASSPATH}'"/>
<echo message="java.class.path = '${java.class.path}'"/>
<!-- Allows a user to overide certain user specific properties. -->
<echo message="user.home = '${user.home}'"/>
<echo message="Loading user properties from: '${user.home}/build.properties'"/>
<property file="${user.home}/build.properties"/>
<property file="${test.properties}"/>
<!-- Sets default junit.lib and all extensions.depend dir locations to static paths -->
<!-- temporary until all build files reworked -->
<property name="oracle.extensions.depend.dir" value="${trunk.build.location}/../extension.oracle.lib.external"/>
<echo message="oracle.extensions.depend.dir = '${oracle.extensions.depend.dir}'"/>
<!-- This HAS to be defined after allowing user redefinitions (which will cause the condition not to set anything) -->
<!-- This tests to make sure the extensions dir exists, if not sets to a existant dummy location -->
<condition property="extensions.depend.dir" value="${trunk.build.location}/../extension.lib.external"
else="${trunk.build.location}">
<available file="${trunk.build.location}/../extension.lib.external" type="dir"/>
</condition>
<echo message="extensions.depend.dir = '${extensions.depend.dir}'"/>
<condition property="junit.lib" value="${extensions.depend.dir}/junit.jar">
<available file="${extensions.depend.dir}/junit.jar"/>
</condition>
<echo message="junit.lib = '${junit.lib}' (if not set tests may not compile; let alone run)"/>
<echo message="Loading default properties from: '${trunk.build.location}/build.properties'"/>
<!-- The default for junit.lib is still "junit.jar", even though we now depend upon junit 4.5 -->
<property file="${trunk.build.location}/antbuild.properties"/>
<!-- Detect compatible version of Ant (>= 1.7.0). -->
<condition property="compat.ant" value="true">
<matches string="${ant.version}" pattern="1.(?:[7-9]|[1-9]\d)(?:.\d+)*.*"/>
</condition>
<echo message="Ant version detected: '${ant.version}'"/>
<fail message="An non-compatible version of Ant was detected! Build won't run properly unless running at least 1.7.x of Ant!." unless="compat.ant"/>
<!-- Detect compatible version of JDK (>= 1.8). -->
<condition property="compat.jdk" value="true">
<matches string="${java.version}" pattern="1.(?:[8-9]|[1-9]\d)(?:.\d+)*.*|9.*"/>
</condition>
<echo message="JDK version detected: '${java.version}'"/>
<fail message="A non-compatible version of JDK was detected! Build won't run properly unless running on at least JDK 1.8!." unless="compat.jdk"/>
<!-- JDBC driver settings info -->
<condition property="msg.jdbc.driver.jar.configured" value="JDBC driver JAR: '${jdbc.driver.jar}'" else="JDBC driver JAR: jdbc.driver.jar property missing">
<isset property="jdbc.driver.jar"/>
</condition>
<echo message="${msg.jdbc.driver.jar.configured}"/>
<!-- controls which goals to invoke with maven (default is 'verify') -->
<property name="maven.goals" value="verify"/>
<!-- versioning -->
<!-- These variables are set in autobuild.xml. A manual build gets defaults -->
<tstamp>
<format property="build.date" pattern="yyyyMMdd"/>
<format property="build.time" pattern="HHmm"/>
</tstamp>
<property name="build.type" value="SNAPSHOT"/>
<property name="git.hash" value="NA"/>
<condition property="version.qualifier" value="qualifier" else="v${build.date}-${git.hash}">
<equals arg1="${git.hash}" arg2="NA"/>
</condition>
<property name="version.string" value="${release.version}-${version.qualifier}"/>
<property name="release.designation" value="EclipseLink DeveloperBuild"/>
<path id="javadoc.path">
<pathelement path="${eclipselink.jar}"/>
<pathelement path="${eclipselink.sdo.plugins}/${commonj.sdo.jar}"/>
<pathelement path="${eclipselink.plugins}/${antlr}"/>
<pathelement path="${eclipselink.plugins}/${asm}"/>
<pathelement path="${eclipselink.plugins}/${jaxb-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${jaxb-core.jar}"/>
<pathelement path="${eclipselink.plugins}/${jaxb-xjc.jar}"/>
<pathelement path="${eclipselink.jpa.plugins}/${persistence22.jar}"/>
<pathelement path="${eclipselink.plugins}/${resource.jar}"/>
<pathelement path="${eclipselink.plugins}/${json-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${javax.validation.jar}"/>
<pathelement path="${eclipselink.plugins}/${ejb.jar}"/>
<pathelement path="${eclipselink.plugins}/${jms.jar}"/>
<pathelement path="${eclipselink.plugins}/${transaction.jar}"/>
<pathelement path="${eclipselink.plugins}/${mail.jar}"/>
<pathelement path="${eclipselink.plugins}/${wsrs.jar}"/>
<pathelement path="${eclipselink.plugins}/${slf4j.api.jar}"/>
<pathelement path="${eclipselink.plugins}/org.eclipse.persistence.nosql_${version.string}.jar"/>
<pathelement path="${eclipselink.plugins}/org.eclipse.persistence.extension_${version.string}.jar"/>
<pathelement path="${extensions.depend.dir}/${jgroups.jar}"/>
<pathelement path="${java.class.path}"/>
</path>
<path id="nosql.javadoc.path">
<path refid="javadoc.path"/>
<fileset
dir="${eclipselink.plugins}"
includes="*nosql*"
excludes="*source*"/>
</path>
<path id="jpars.javadoc.path">
<path refid="javadoc.path"/>
<pathelement path="${eclipselink.plugins}/com.sun.jersey_1.8.0.201204181614.jar"/>
<pathelement path="${eclipselink.plugins}/javax.ejb_3.1.0.v201205171433.jar"/>
</path>
<!-- ================================================================================= -->
<!-- Check oracle extension dependencies helper target -->
<target name="check.oracle.dependencies">
<!-- Locate libraries in oracle.extensions.depend.dir first and extensions.depend.dir second -->
<condition property="file.ojdbc.jar" value="${oracle.extensions.depend.dir}/${ojdbc.jar}"
else="${extensions.depend.dir}/${ojdbc.jar}">
<available file="${oracle.extensions.depend.dir}/${ojdbc.jar}"/>
</condition>
<condition property="file.orai18n.jar" value="${oracle.extensions.depend.dir}/${orai18n.jar}"
else="${extensions.depend.dir}/${orai18n.jar}">
<available file="${oracle.extensions.depend.dir}/${orai18n.jar}"/>
</condition>
<condition property="file.orai18n-mapping.jar" value="${oracle.extensions.depend.dir}/${orai18n-mapping.jar}"
else="${extensions.depend.dir}/${orai18n-mapping.jar}">
<available file="${oracle.extensions.depend.dir}/${orai18n-mapping.jar}"/>
</condition>
<condition property="file.aqapi.jar" value="${oracle.extensions.depend.dir}/${aqapi.jar}"
else="${extensions.depend.dir}/${aqapi.jar}">
<available file="${oracle.extensions.depend.dir}/${aqapi.jar}"/>
</condition>
<condition property="file.xdb.jar" value="${oracle.extensions.depend.dir}/${xdb.jar}"
else="${extensions.depend.dir}/${xdb.jar}">
<available file="${oracle.extensions.depend.dir}/${xdb.jar}"/>
</condition>
<condition property="file.xmlparser.jar" value="${oracle.extensions.depend.dir}/${xmlparser.jar}"
else="${extensions.depend.dir}/${xmlparser.jar}">
<available file="${oracle.extensions.depend.dir}/${xmlparser.jar}"/>
</condition>
<condition property="file.ucp.jar" value="${oracle.extensions.depend.dir}/${ucp.jar}"
else="${extensions.depend.dir}/${ucp.jar}">
<available file="${oracle.extensions.depend.dir}/${ucp.jar}"/>
</condition>
<condition property="file.dms.jar" value="${oracle.extensions.depend.dir}/${dms.jar}"
else="${extensions.depend.dir}/${dms.jar}">
<available file="${oracle.extensions.depend.dir}/${dms.jar}"/>
</condition>
<condition property="file.kvclient.jar" value="${oracle.extensions.depend.dir}/${kvclient.jar}"
else="${extensions.depend.dir}/${kvclient.jar}">
<available file="${oracle.extensions.depend.dir}/${kvclient.jar}"/>
</condition>
<!-- Oracle libraries dependency check -->
<condition property="is.ojdbc.jar">
<available file="${file.ojdbc.jar}"/>
</condition>
<condition property="is.orai18n.jar">
<available file="${file.orai18n.jar}"/>
</condition>
<condition property="is.orai18n-mapping.jar">
<available file="${file.orai18n-mapping.jar}"/>
</condition>
<condition property="is.aqapi.jar">
<available file="${file.aqapi.jar}"/>
</condition>
<condition property="is.xdb.jar">
<available file="${file.xdb.jar}"/>
</condition>
<condition property="is.xmlparser.jar">
<available file="${file.xmlparser.jar}"/>
</condition>
<condition property="is.ucp.jar">
<available file="${file.ucp.jar}"/>
</condition>
<condition property="is.dms.jar">
<available file="${file.dms.jar}"/>
</condition>
<condition property="is.kvclient.jar">
<available file="${file.kvclient.jar}"/>
</condition>
<!-- All checks evaluation -->
<condition property="oracle.dependencies.available">
<and>
<isset property="is.ojdbc.jar"/>
<isset property="is.orai18n.jar"/>
<isset property="is.orai18n-mapping.jar"/>
<isset property="is.aqapi.jar"/>
<isset property="is.xdb.jar"/>
<isset property="is.xmlparser.jar"/>
<isset property="is.ucp.jar"/>
<isset property="is.dms.jar"/>
<isset property="is.kvclient.jar"/>
</and>
</condition>
<!-- Check staus messages -->
<condition property="msg.oracle.dependencies" value="Oracle DB dependencies check passed:" else="Oracle DB dependencies check failed:">
<isset property="oracle.dependencies.available"/>
</condition>
<condition property="msg.ojdbc.jar" value=" + ${file.ojdbc.jar} library found" else=" - ${ojdbc.jar} library missing">
<isset property="is.ojdbc.jar"/>
</condition>
<condition property="msg.orai18n.jar" value=" + ${file.orai18n.jar} library found" else=" - ${orai18n.jar} library missing">
<isset property="is.orai18n.jar"/>
</condition>
<condition property="msg.orai18n-mapping.jar" value=" + ${file.orai18n-mapping.jar} library found" else=" - ${orai18n-mapping.jar} library missing">
<isset property="is.orai18n-mapping.jar"/>
</condition>
<condition property="msg.aqapi.jar" value=" + ${file.aqapi.jar} library found" else=" - ${aqapi.jar} library missing">
<isset property="is.aqapi.jar"/>
</condition>
<condition property="msg.xdb.jar" value=" + ${file.xdb.jar} library found" else=" - ${xdb.jar} library missing">
<isset property="is.xdb.jar"/>
</condition>
<condition property="msg.xmlparser.jar" value=" + ${file.xmlparser.jar} library found" else=" - ${xmlparser.jar} library missing">
<isset property="is.xmlparser.jar"/>
</condition>
<condition property="msg.ucp.jar" value=" + ${file.ucp.jar} library found" else=" - ${ucp.jar} library missing">
<isset property="is.ucp.jar"/>
</condition>
<condition property="msg.dms.jar" value=" + ${file.dms.jar} library found" else=" - ${dms.jar} library missing">
<isset property="is.dms.jar"/>
</condition>
<condition property="msg.kvclient.jar" value=" + ${file.kvclient.jar} library found" else=" - ${kvclient.jar} library missing">
<isset property="is.kvclient.jar"/>
</condition>
</target>
<!-- Check oracle DB driver class helper target -->
<target name="check.oracle.db-driver.dependencies">
<!-- Oracle DB driver class settings check (oracle.jdbc.OracleDriver is expected value) -->
<condition property="oracle.db-driver.available">
<contains string="${db.driver}" substring="oracle"/>
</condition>
<condition property="oracle.jdbc.dependencies.available">
<and>
<isset property="oracle.dependencies.available"/>
<isset property="oracle.db-driver.available"/>
</and>
</condition>
</target>
<!-- Check oracle extension dependencies and print check status helper target -->
<target name="oracle.dependencies" depends="check.oracle.dependencies">
<echo message="${msg.oracle.dependencies}"/>
<echo message="${msg.ojdbc.jar}"/>
<echo message="${msg.orai18n.jar}"/>
<echo message="${msg.orai18n-mapping.jar}"/>
<echo message="${msg.aqapi.jar}"/>
<echo message="${msg.xdb.jar}"/>
<echo message="${msg.xmlparser.jar}"/>
<echo message="${msg.ucp.jar}"/>
<echo message="${msg.dms.jar}"/>
<echo message="${msg.kvclient.jar}"/>
</target>
<!-- Check oracle JDBC driver and extension dependencies and print check status helper target -->
<target name="oracle.jdbc.dependencies" depends="check.oracle.dependencies, check.oracle.db-driver.dependencies">
<condition property="msg.oracle.jdbc.dependencies" value="Oracle DB driver and dependencies check passed:" else="Oracle DB driver and dependencies check failed:">
<isset property="oracle.jdbc.dependencies.available"/>
</condition>
<condition property="msg.jdbc.oracle" value=" + Oracle DB driver configured" else=" - Oracle DB driver not configured.">
<isset property="oracle.db-driver.available"/>
</condition>
<echo message="${msg.oracle.jdbc.dependencies}"/>
<echo message="${msg.jdbc.oracle}"/>
<echo message="${msg.orai18n.jar}"/>
<echo message="${msg.orai18n-mapping.jar}"/>
<echo message="${msg.aqapi.jar}"/>
<echo message="${msg.ojdbc.jar}"/>
<echo message="${msg.xdb.jar}"/>
<echo message="${msg.xmlparser.jar}"/>
<echo message="${msg.ucp.jar}"/>
<echo message="${msg.dms.jar}"/>
<echo message="${msg.kvclient.jar}"/>
</target>
<!-- Check oracle JDBC driver and extension dependencies. Fail when check did not passed. -->
<target name="check-oracle-dependencies" depends="oracle.jdbc.dependencies">
<fail message="Oracle DB dependencies missing. Check dependency libraries and oracle.extensions.depend.dir and extensions.depend.dir properties" unless="oracle.dependencies.available"/>
<fail message="Oracle DB JDBC driver is missing. Check jdbc.driver.jar property." unless="oracle.db-driver.available"/>
</target>
<!-- *** Convienience and Compatability targets *** -->
<!-- Short alias for building the jar. -->
<target name="jar" depends="build-eclipselink-jar"/>
<!-- Short alias for building the jar. -->
<target name="package-core" depends="dev-package-bundles, package-eclipselink-jar" description="package eclipselink without recompiling (*** dev use only ***)"/>
<!-- ================================================================================= -->
<!-- "top-level" target for creating the distribution archives. -->
<target name="package-all" depends="package-eclipselink-bundles, package-src-jar, package-tst-src-zip, package-tst-jar-zip, package-javadoc-zip, package-installer-zip, package-eclipselink-nosql-install"/>
<!-- Compiles all components except tests, builds eclipselink.jar. -->
<target name="build-eclipselink-jar" depends="build-core, package-eclipselink-jar" description="build all EclipseLink distribution files except docs and tests"/>
<!-- compiles and builds all components, packages eclipselink.jar and src zip. -->
<target name="build-src" depends="build-eclipselink-jar, package-src-jar" description="build EclipseLink jar and source zip"/>
<!-- Default ant target, compiles all components and tests, builds eclipselink.jar. -->
<target name="build" depends="build-eclipselink-jar, build-core-test, build-oracle-if-dependencies" description="build all EclipseLink distribution files except docs"/>
<!-- Default ant target, compiles all components and tests, builds eclipselink.jar. -->
<target name="build-no-test" depends="build-eclipselink-jar, build-util, package-all" description="build all EclipseLink distribution files except docs"/>
<!-- Compiles all components and tests (excluding extensions). -->
<target name="build-all-but-ext" depends="build, build-util, build-util-test, gen-wls-shared-lib"/>
<!-- Compiles Oracle components, tests and extensions (excluding utilities). -->
<target name="build-oracle" depends="build-oracle-test"/> <!-- added for backward compatibility -->
<target name="build-oracle-test" depends="build-oracle-extension-test, build-oracle-spatial-extension-test, build-oracle-nosql-extension-test"/>
<!-- Compiles Oracle components, tests and extensions (excluding utilities) if dependencies are available. -->
<target name="build-oracle-if-dependencies" depends="oracle.jdbc.dependencies" if="oracle.jdbc.dependencies.available">
<antcall target="build-oracle-test"/>
</target>
<!-- Builds and packages all jars,javadoc, and builds installer. -->
<target name="build-distribution" depends="build-all-but-ext, package-all, gen-wls-shared-lib"/>
<!-- ================================================================================= -->
<!-- Needed for Maven/Tycho builds -->
<target name="check-maven" description="Verify the Maven tool is installed and configured">
<condition property="M2_HOME" value="${env.M2_HOME}"
else="C:/apache-maven-3.0.3">
<isset property="env.M2_HOME"/>
</condition>
<echo message="Maven install (M2_HOME) set to: '${M2_HOME}'"/>
<available file="${M2_HOME}/bin/mvn" property="use.maven"/>
<fail message="Maven 3 not found. Build won't run if Maven 3 not installed and M2_HOME properly set!." unless="use.maven"/>
</target>
<target name="set-compdeps" depends="check-maven" description="Setup for use of local compdeps rather than hosted, and whether to generate">
<!-- Determine whether the build could generate/use a local compdeps repo -->
<!-- To setup generation of local compdeps: -->
<!-- Set "eclipse.install.dir" to a valid Eclipse installation -->
<!-- (Indigo or higher has been tested) by using a -D on -->
<!-- the commandline, or adding it in a user properties file -->
<!-- Test to see if local repo can be generated: tools exist -->
<condition property="local.compdeps" value="true" else="false">
<and>
<isset property="eclipse.install.dir"/>
<available file="${eclipse.install.dir}/plugins" type="dir"/>
</and>
</condition>
<!-- Test to see if local repo should be generated: if local set and if can -->
<condition property="generate.compdeps">
<equals arg1="${local.compdeps}" arg2="true"/>
</condition>
<echo message="Compdeps Settings:"/>
<echo message=" Whether to use a local compdeps p2 repo:"/>
<echo message=" local.compdeps: '${local.compdeps}'"/>
<echo message=" Whether a local p2epo needs generating (only true if using local and repo not found):"/>
<echo message=" generate.compdeps: '${generate.compdeps}'"/>
<delete dir="${eclipselink.compdeps}/p2repo" failonerror="false"/>
</target>
<!-- Cleans all build generated files. -->
<target name="clean" depends="clean-runtime,clean-testing" description="Clean the build"/>
<target name="clean-runtime" depends="generate-local-compdeps, clean-runtime-checkedin, clean-runtime-built" description="Clean the runtime projects"/>
<!-- This allows testing to call a specific target that won't remove the default
(or dropped-in copy of) eclipselink and the persistence jar, while still
allowing unchanged operation by developers and users to clean all built artifacts. -->
<target name="clean-runtime-checkedin" description="Clean the runtime projects">
<!-- Remove Build artifacts, and potential "confict" files from check-out -->
<delete failonerror="false">
<fileset dir="${trunk.build.location}" includes="${eclipselink.jar}*"/>
</delete>
<delete failonerror="false">
<fileset dir="${trunk.build.location}" includes="${eclipselink.src.install.prefix}${eclipselink.zip.suffix}*"/>
</delete>
<delete failonerror="false">
<fileset dir="${trunk.build.location}" includes="org.eclipse.persistence*.ear"/>
</delete>
<delete failonerror="false">
<fileset dir="${eclipselink.util.rename}" includes="${package-rename.jar}*"/>
</delete>
</target>
<target name="clean-runtime-built" description="Clean the runtime projects" depends="clean-core">
<ant antfile="antbuild.xml" dir="${eclipselink.modelgen}" target="clean"/>
<ant antfile="antbuild.xml" dir="${eclipselink.moxy.dynamicxjc}" target="clean"/>
<ant antfile="antbuild.xml" dir="${eclipselink.util.jaxb}" target="clean"/>
<!-- ant antfile="antbuild.xml" dir="${eclipselink.util.rename}" target="clean"/ -->
<ant antfile="antbuild.xml" dir="${eclipselink.util.sigcompare}" target="clean"/>
<ant antfile="build.xml" dir="${eclipselink.util.workbench}" target="clean"/>
<delete failonerror="false">
<fileset dir="." includes="*${eclipselink.zip.suffix}"/>
</delete>
</target>
<target name="clean-core" depends="check-maven" description="Clean the maven built runtime projects">
<java dir="${eclipselink.mvn.parent}" fork="true" failonerror="true" classname="org.codehaus.plexus.classworlds.launcher.Launcher">
<jvmarg value="-Dclassworlds.conf=${M2_HOME}/bin/m2.conf"/>
<jvmarg value="-Dmaven.home=${M2_HOME}"/>
<jvmarg value="-Dmaven.multiModuleProjectDirectory=${eclipselink.mvn.parent}"/>
<jvmarg value="-Dlocal.compdeps=${local.compdeps}"/>
<jvmarg value="-Declipselink.full=true"/>
<arg value="clean"/>
<classpath>
<fileset dir="${M2_HOME}/boot">
<include name="plexus-classworlds-*.jar"/>
</fileset>
</classpath>
</java>
<delete>
<fileset dir="${plugins.dir}">
<include name="**/org.eclipse.persistence*.jar"/>
<include name="**/eclipselink*.jar"/>
<exclude name="**/org.eclipse.persistence.a*.jar"/>
<exclude name="**/org.eclipse.persistence*oracle*.jar"/>
</fileset>
</delete>
</target>
<target name="clean-testing" description="Clean the testing projects">
<ant antfile="antbuild.xml" dir="${eclipselink.core.test}" target="clean"/>
<ant antfile="antbuild.xml" dir="${eclipselink.extension.test}" target="clean"/>
<ant antfile="antbuild.xml" dir="${eclipselink.jpa.test}" target="clean"/>
<ant antfile="antbuild.xml" dir="${eclipselink.hermes.test}" target="clean"/>
<ant antfile="antbuild.xml" dir="${eclipselink.moxy.test}" target="clean"/>
<ant antfile="antbuild.xml" dir="${eclipselink.sdo.test}" target="clean"/>
<ant antfile="build.xml" dir="${eclipselink.util.workbench.test}" target="clean"/>
<delete file="${eclipselink.tst.src.prefix}${eclipselink.zip.suffix}" failonerror="false"/>
<antcall target="clean-oracle-if-dependencies"/>
</target>
<target name="clean-oracle" depends="clean-oracle-test"/>
<target name="clean-oracle-test" depends="clean-oracle-extension-test, clean-oracle-spatial-extension-test, clean-oracle-nosql-extension-test"/>
<!-- Compiles Oracle components, tests and extensions (excluding utilities) if dependencies are available. -->
<target name="clean-oracle-if-dependencies" depends="oracle.dependencies" if="oracle.dependencies.available">
<antcall target="clean-oracle-test"/>
</target>
<target name="clean-oracle-extension-test">
<ant antfile="antbuild.xml" dir="${eclipselink.extension.oracle.test}" target="clean"/>
</target>
<target name="clean-oracle-spatial-extension-test">
<ant antfile="antbuild.xml" dir="${eclipselink.extension.oracle.spatial.test}" target="clean"/>
</target>
<target name="clean-oracle-nosql-extension-test">
<ant antfile="antbuild.xml" dir="${eclipselink.extension.oracle.nosql.test}" target="clean"/>
</target>
<target name="generate-local-compdeps" if="generate.compdeps" depends="set-compdeps" description="Build local p2 repository of local compiler dependencies">
<!-- a bit redundant, but here as a failsafe. -->
<available file="${eclipse.install.dir}/plugins" type="dir" property="eclipse.dir.exist"/>
<fail message="Specified Eclipse installation (${eclipse.install.dir}/plugins) not found. Exiting..." unless="eclipse.dir.exist"/>
<echo message="Generating local 'Compile Dependency P2 Repository' using tools found in '${eclipse.install.dir}/plugins'."/>
<ant antfile="antbuild.xml" dir="${eclipselink.compdeps}" target="build"/>
</target>
<!-- Compiles all runtime components (excluding Tests, Oracle extensions). -->
<target name="build-core" depends="generate-local-compdeps, clean-runtime-checkedin">
<echo message="Launching Maven build with the following parameters:"/>
<echo message=" -Dclassworlds.conf=${M2_HOME}/bin/m2.conf"/>
<echo message=" -Dmaven.home=${M2_HOME}"/>
<echo message=" -Dmaven.multiModuleProjectDirectory=${eclipselink.mvn.parent}"/>
<echo message=" -Dbuild.qualifier=${version.qualifier}"/>
<echo message=" -DforceContextQualifier=${version.qualifier}"/>
<echo message=" -Dlocal.compdeps=${local.compdeps}"/>
<echo message=" -Declipselink.full=true"/>
<echo message=" ${maven.goals}"/>
<java dir="${eclipselink.mvn.parent}" fork="true" failonerror="true" classname="org.codehaus.plexus.classworlds.launcher.Launcher">
<jvmarg value="-Dclassworlds.conf=${M2_HOME}/bin/m2.conf"/>
<jvmarg value="-Dmaven.home=${M2_HOME}"/>
<jvmarg value="-Dmaven.multiModuleProjectDirectory=${eclipselink.mvn.parent}"/>
<jvmarg value="-Dbuild.qualifier=${version.qualifier}"/>
<jvmarg value="-DforceContextQualifier=${version.qualifier}"/>
<jvmarg value="-Dlocal.compdeps=${local.compdeps}"/>
<jvmarg value="-Declipselink.full=true"/>
<arg line="${maven.goals}"/>
<classpath>
<fileset dir="${M2_HOME}/boot">
<include name="plexus-classworlds-*.jar"/>
</fileset>
</classpath>
</java>
<!-- source jars generated with -sources in target dir - tycho P2 should name properly, but can't use due to dir structure -->
<!-- Below not needed as long as parent post-processing with ant used to inject common html files -->
<!-- copy todir="${plugins.dir}" flatten="true">
<fileset dir="target">
<include name="**/*-sources.jar"/>
</fileset>
<mapper type="glob" from="*-sources.jar" to="*.jar"/>
</copy -->
<copy todir="${plugins.dir}" flatten="true">
<fileset dir="target">
<include name="**/org.eclipse.persistence*.jar"/>
<exclude name="**/*-sources.jar"/>
<exclude name="**/*parent*.jar"/>
</fileset>
</copy>
<!-- build rest of core -->
<ant antfile="antbuild.xml" dir="${eclipselink.modelgen}" target="build"/>
<ant antfile="antbuild.xml" dir="${eclipselink.moxy.dynamicxjc}" target="build"/>
<ant antfile="antbuild.xml" dir="${eclipselink.util.jaxb}" target="build"/>
</target>
<!-- *** intended for dev use only ***
* Create runtime components (excluding Tests) from existing classes in project heirarchy.
* note: oracle extension tries to be tricksy and either jars from classes like others,
* or "rejars" from prebuilt bundle if classes dir doesn't exist.
* REMOVE???? all these jars now built with Maven... to remove antbuild.xml files this will need
* to go as well.
* -->
<target name="dev-package-bundles" depends="clean-runtime-checkedin">
<ant antfile="antbuild.xml" dir="${eclipselink.hermes}" target="jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.core}" target="jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.dbws}" target="jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.jpa}" target="jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.moxy}" target="jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.sdo}" target="jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.extension.oracle}" target="jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.extension.nosql}" target="jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.extension.oracle.nosql}" target="jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.modelgen}" target="jar"/>
</target>
<!-- Compiles all utils components. -->
<target name="build-util">
<ant antfile="antbuild.xml" dir="${eclipselink.util.sigcompare}" target="build"/>
<ant antfile="antbuild.xml" dir="${eclipselink.util.rename}" target="build"/>
<ant antfile="build.xml" dir="${eclipselink.util.workbench}" target="all"/>
</target>
<!-- Oracle extensions Targets -->
<target name="clean-oracle-extension" depends="generate-oracle-p2, generate-local-compdeps" description="Clean the maven built oracle projects">
<!-- === Which extensions 'clean' is based on ${oracle.target} === -->
<!-- oracle.target = oracle.ext: build oracle extension -->
<!-- = oracle.nosql: build oracle nosql extension -->
<!-- = oracle: build both -->
<java dir="${eclipselink.mvn.parent}" fork="true" failonerror="true" classname="org.codehaus.plexus.classworlds.launcher.Launcher">
<jvmarg value="-Dclassworlds.conf=${M2_HOME}/bin/m2.conf"/>
<jvmarg value="-Dmaven.home=${M2_HOME}"/>
<jvmarg value="-Dmaven.multiModuleProjectDirectory=${eclipselink.mvn.parent}"/>
<jvmarg value="-Dlocal.compdeps=${local.compdeps}"/>
<jvmarg value="-D${oracle.target}=true"/>
<jvmarg value="-Doracle.p2.url=${oracle.p2.url}"/>
<arg value="clean"/>
<classpath>
<fileset dir="${M2_HOME}/boot">
<include name="plexus-classworlds-*.jar"/>
</fileset>
</classpath>
</java>
<delete>
<fileset dir="${plugins.dir}">
<include name="**/org.eclipse.persistence.oracle*.jar"/>
</fileset>
</delete>
</target>
<target name="build-oracle-extension" depends="generate-oracle-p2, generate-local-compdeps, clean-runtime-checkedin">
<!-- === Which extensions 'build' is based on ${oracle.target} === -->
<!-- oracle.target = oracle.ext: build oracle extension -->
<!-- = oracle.nosql: build oracle nosql extension -->
<!-- = oracle: build both -->
<echo message="Launching Maven build with the following parameters:"/>
<echo message=" -Dclassworlds.conf=${M2_HOME}/bin/m2.conf"/>
<echo message=" -Dmaven.home=${M2_HOME}"/>
<echo message=" -Dmaven.multiModuleProjectDirectory=${eclipselink.mvn.parent}"/>
<echo message=" -Dbuild.qualifier=${version.qualifier}"/>
<echo message=" -DforceContextQualifier=${version.qualifier}"/>
<echo message=" -Dlocal.compdeps=${local.compdeps}"/>
<echo message=" -D${oracle.target}=true"/>
<echo message=" -Doracle.p2.url=${oracle.p2.url}"/>
<echo message=" ${maven.goals}"/>
<java dir="${eclipselink.mvn.parent}" fork="true" failonerror="true" classname="org.codehaus.plexus.classworlds.launcher.Launcher">
<jvmarg value="-Dclassworlds.conf=${M2_HOME}/bin/m2.conf"/>
<jvmarg value="-Dmaven.home=${M2_HOME}"/>
<jvmarg value="-Dmaven.multiModuleProjectDirectory=${eclipselink.mvn.parent}"/>
<jvmarg value="-Dbuild.qualifier=${version.qualifier}"/>
<jvmarg value="-DforceContextQualifier=${version.qualifier}"/>
<jvmarg value="-Dlocal.compdeps=${local.compdeps}"/>
<jvmarg value="-D${oracle.target}=true"/>
<jvmarg value="-Doracle.p2.url=${oracle.p2.url}"/>
<arg line="${maven.goals}"/>
<classpath>
<fileset dir="${M2_HOME}/boot">
<include name="plexus-classworlds-*.jar"/>
</fileset>
</classpath>
</java>
<!-- source jars generated with -sources in target dir - tycho P2 should name properly, but can't use due to dir structure -->
<copy todir="${plugins.dir}" flatten="true">
<fileset dir="target">
<include name="**/org.eclipse.persistence*.jar"/>
<exclude name="**/*-sources.jar"/>
<exclude name="**/*parent*.jar"/>
</fileset>
</copy>
</target>
<target name="build-oracle-extension-test" depends="check-oracle-dependencies">
<ant antfile="antbuild.xml" dir="${eclipselink.core.test}" target="build"/>
<ant antfile="antbuild.xml" dir="${eclipselink.extension.oracle.test}" target="build"/>
</target>
<target name="build-oracle-spatial-extension-test" depends="check-oracle-dependencies">
<ant antfile="antbuild.xml" dir="${eclipselink.core.test}" target="build"/>
<ant antfile="antbuild.xml" dir="${eclipselink.extension.oracle.spatial.test}" target="build"/>
</target>
<target name="build-oracle-nosql-extension-test" depends="check-oracle-dependencies">
<ant antfile="antbuild.xml" dir="${eclipselink.core.test}" target="build"/>
<ant antfile="antbuild.xml" dir="${eclipselink.extension.oracle.nosql.test}" target="build"/>
</target>
<!-- Compiles tests (excluding workbench, dbws-util and Oracle extensions). -->
<target name="build-core-test">
<ant antfile="antbuild.xml" dir="${eclipselink.core.test}" target="build"/>
<ant antfile="antbuild.xml" dir="${eclipselink.extension.test}" target="build"/>
<ant antfile="antbuild.xml" dir="${eclipselink.jpa.test}" target="build"/>
<ant antfile="antbuild.xml" dir="${eclipselink.hermes.test}" target="build"/>
<!-- ant antfile="${eclipselink.jpa.test}/antbuild.xml" target="all"/ -->
<ant antfile="antbuild.xml" dir="${eclipselink.jpa.wdf.test}" target="build-against-jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.jpars.test}" target="build"/>
<ant antfile="antbuild.xml" dir="${eclipselink.moxy.test}" target="compile-tests-against-jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.sdo.test}" target="compile-sdo-tests-against-jar"/>
<ant antfile="antbuild.xml" dir="${eclipselink.dbws.test}" target="build"/>
</target>
<target name="build-nosql-test">
<ant antfile="antbuild.xml" dir="${eclipselink.extension.nosql.test}" target="build"/>
</target>
<!-- Compiles all util tests -->
<target name="build-util-test" depends="build-workbench-test, build-dbws-utils-test"/>
<target name="build-workbench-test">
<ant antfile="build.xml" dir="${eclipselink.util.workbench.test}" target="all"/>
</target>
<target name="build-dbws-utils-test" if="compat.jdk">
<ant antfile="antbuild.xml" dir="${eclipselink.dbws.builder.test}" target="build"/>
</target>
<target name="test-host" description="verify host is defined">
<condition property="host.is.Eclipse" value="true">
<and>
<equals arg1="${host}" arg2="Eclipse"/>
<isset property="_Unix"/>
</and>
</condition>
</target>
<target name="init-default-testconfig" if="host.is.Eclipse" depends="test-host" description="initialize to Eclipse build config details">
<property name="host" value="Eclipse"/>
<property name="platform.string" value="SUSE Linux Enterprise Server 11 SP1 (Kernal: 2.6.32.19-0.3-default) (x86_64)"/>
<property name="jvm.string" value="Sun Java 6 64-bit ${java.version}"/>
<property name="junit.string" value="1.4.5"/>
<property name="dbplat.string" value="MySql 5.1"/>
<property name="jdbcdriver.string" value="MySQL 5.0.8"/>
<property name="GTC.ready" value="true"/>
</target>
<target name="init-testconfig" depends="init-default-testconfig" description="initialize to Eclipse build config details">
<condition property="GTC.ready" value="true">
<and>
<isset property="host"/>
<isset property="platform.string"/>
<isset property="jvm.string"/>
<isset property="junit.string"/>
<isset property="dbplat.string"/>
<isset property="jdbcdriver.string"/>
</and>
</condition>
<echo message="host: '${host}'"/>
<echo message="platform.string: '${platform.string}'"/>
<echo message="jvm.string: '${jvm.string}'"/>
<echo message="junit.string: '${junit.string}'"/>
<echo message="dbplat.string: '${dbplat.string}'"/>
<echo message="jdbcdriver.string: '${jdbcdriver.string}'"/>
<fail message="'generate-testconfig' cannot proceed. Missing configuration information." unless="GTC.ready"/>
</target>
<target name="generate-testconfig" if="GTC.ready" depends="init-testconfig" description="generate a 'TestConfig.html' file for test publishing">
<echo message="<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en' dir='ltr'>" file="${trunk.build.location}/TestConfig.html" append="false"/>
<echo message="<head><title>EclipseLink Project: '${host}' hosted Test Environment Details</title></head>" file="${trunk.build.location}/TestConfig.html" append="false"/>
<echo message="<body><h3>EclipseLink Project: '${host}' hosted Test Environment Details</h3><table>" file="${trunk.build.location}/TestConfig.html" append="true"/>
<echo message="<tr><td><i>Platform:</i></td><td> ${platform.string} </td></tr>" file="${trunk.build.location}/TestConfig.html" append="true"/>
<echo message="<tr><td><i>JVM:</i></td><td> ${jvm.string} </td></tr>" file="${trunk.build.location}/TestConfig.html" append="true"/>
<echo message="<tr><td><i>JUnit:</i></td><td> ${junit.string} </td></tr>" file="${trunk.build.location}/TestConfig.html" append="true"/>
<echo message="<tr><td><i>Db:</i></td><td> ${dbplat.string} </td></tr>" file="${trunk.build.location}/TestConfig.html" append="true"/>
<echo message="<tr><td><i>JDBC Driver:</i></td><td> ${jdbcdriver.string} </td></tr></table>" file="${trunk.build.location}/TestConfig.html" append="true"/>
<echo message="</body></html>" file="${trunk.build.location}/TestConfig.html" append="true"/>
</target>
<!-- Packages the eclipselink.jar. -->
<target name="package-eclipselink-jar" description="build EclipseLink jar">
<delete file="${eclipselink.jar}"/>
<echo message="Implementation-Version: ${version.string}"/>
<delete dir="${build.dir}/javax.persistence/${classes.dir}" failonerror="false"/>
<mkdir dir="${build.dir}/javax.persistence/${classes.dir}"/>
<unzip src="${eclipselink.jpa.plugins}/${persistence22.jar}" dest="${build.dir}/javax.persistence/${classes.dir}"/>
<mkdir dir="${build.dir}/hermes/${classes.dir}"/>
<unzip src="${eclipselink.plugins}/org.eclipse.persistence.jpa.jpql_${version.string}.jar" dest="${build.dir}/hermes/${classes.dir}"/>
<jar jarfile="${eclipselink.jar}" duplicate="preserve">
<manifest>
<attribute name="Specification-Title" value="${eclipselink.specification.title}"/>
<attribute name="Specification-Vendor" value="${specification.vendor}"/>
<attribute name="Specification-Version" value="${release.version}"/>
<attribute name="Implementation-Title" value="${eclipselink.implementation.title}"/>
<attribute name="Implementation-Vendor" value="${implementation.vendor}"/>
<attribute name="Implementation-Version" value="${version.string}"/>
<attribute name="Release-Designation" value="${release.designation}"/>
<attribute name="Premain-Class" value="${eclipselink.premain.class}"/>
<attribute name="Main-Class" value="${eclipselink.main.class}"/>
</manifest>
<!-- Include license files first to ensure the right ones are included -->
<fileset dir=".">
<include name="${about-file}"/>
<include name="${readme-file}"/>
<include name="${license-files}"/>
</fileset>
<!-- Include all non-duplicate content from bOSGi bundles -->
<zipgroupfileset dir="${eclipselink.plugins}">
<include name="org.eclipse.persistence*${version.string}.jar"/>
<include name="org.eclipse.persistence.asm*.jar"/>
<include name="org.eclipse.persistence.antlr*.jar"/>
<include name="org.eclipse.persistence.oracle_*.jar"/>
<exclude name="*.jpa.jpql*.jar"/>
<exclude name="*source*.jar"/>
<exclude name="*modelgen*.jar"/>
<exclude name="*equinox*.jar"/>
<exclude name="*builder*.jar"/>
<exclude name="*jpars*.jar"/>
<exclude name="*nosql*.jar"/>
<exclude name="*extension*.jar"/>
</zipgroupfileset>
<!-- Include hermes runtime Only -->
<fileset dir="${build.dir}/hermes/${classes.dir}">
<include name="**/*"/>
<exclude name="**/tools*/**"/>
</fileset>
<!-- Include Moxy Dynamicxjc classes -->
<fileset
dir="${eclipselink.moxy.dynamicxjc}/${classes.dir}"
includes="**/*.class,"/>
<!-- Include necessary JAXB classes -->
<fileset
dir="${eclipselink.util.jaxb}/${classes.dir}"
includes="**/*.class,"/>
<!-- JPA 2.0/2.2 concurrent dev solution: New classes from javax.persistence 2.0 & 2.2 -->
<fileset
dir="${build.dir}/javax.persistence/${classes.dir}"
includes="
javax/persistence/Access.class,
javax/persistence/AccessType.class,
javax/persistence/Cache.class,
javax/persistence/Cacheable.class,
javax/persistence/CacheStoreMode.class,
javax/persistence/CacheRetrieveMode.class,
javax/persistence/LockModeType.class,
javax/persistence/LockTimeoutException.class,
javax/persistence/PessimisticLockException.class,
javax/persistence/PessimisticLockScope.class,
javax/persistence/NamedQuery.class,
javax/persistence/ElementCollection.class,
javax/persistence/CollectionTable.class,
javax/persistence/MapKey.class,
javax/persistence/MapKeyClass.class,
javax/persistence/MapKeyColumn.class,
javax/persistence/MapKeyEnumerated.class,
javax/persistence/MapKeyTemporal.class,
javax/persistence/OrderColumn.class,
javax/persistence/CaseExpression.class,
javax/persistence/Parameter.class,
javax/persistence/Aggregate.class,
javax/persistence/TrimSpec.class,
javax/persistence/CollectionTable.class,
javax/persistence/MapKeyJoinColumns.class,
javax/persistence/MapsId.class,
javax/persistence/MapKeyJoinColumn.class,
javax/persistence/DomainObject.class,
javax/persistence/Predicate.class,
javax/persistence/FetchJoinObject.class,
javax/persistence/OrderByItem.class,
javax/persistence/Expression.class,
javax/persistence/QueryDefinition.class,
javax/persistence/SelectItem.class,
javax/persistence/SequenceGenerators.class,
javax/persistence/TableGenerators.class,
javax/persistence/criteria/CriteriaBuilder.class,
javax/persistence/TypedQuery.class,
javax/persistence/ValidationMode.class,
javax/persistence/criteria/CriteriaBuilder$Trimspec.class,
javax/persistence/criteria/CriteriaBuilder$SimpleCase.class,
javax/persistence/criteria/CriteriaBuilder$Coalesce.class,
javax/persistence/criteria/CriteriaBuilder$In.class,
javax/persistence/criteria/CriteriaBuilder$Case.class,
javax/persistence/PredicateOperand.class,
javax/persistence/PathExpression.class,
javax/persistence/PersistenceUtil.class,
javax/persistence/PersistenceUnitUtil.class,
javax/persistence/Tuple.class,
javax/persistence/QueryTimeoutException.class,
javax/persistence/TupleElement.class,
javax/persistence/SharedCacheMode.class,
javax/persistence/spi/LoadState.class
javax/persistence/spi/ProviderUtil.class,
javax/persistence/metamodel/Attribute.class,
javax/persistence/metamodel/Type$PersistenceType.class,
javax/persistence/criteria/Predicate$BooleanOperator.class,
javax/persistence/metamodel/Attribute$PersistentAttributeType.class,
javax/persistence/metamodel/BasicType.class,
javax/persistence/metamodel/Bindable.class,
javax/persistence/metamodel/Bindable$BindableType.class,
javax/persistence/metamodel/CollectionAttribute.class,
javax/persistence/metamodel/EmbeddableType.class,
javax/persistence/metamodel/EntityType.class,
javax/persistence/metamodel/IdentifiableType.class,
javax/persistence/metamodel/ListAttribute.class,
javax/persistence/metamodel/ManagedType.class,
javax/persistence/metamodel/MapAttribute.class,
javax/persistence/metamodel/MappedSuperclassType.class,
javax/persistence/metamodel/Metamodel.class,
javax/persistence/metamodel/PluralAttribute.class,
javax/persistence/metamodel/PluralAttribute$CollectionType.class,
javax/persistence/metamodel/SetAttribute.class,
javax/persistence/metamodel/SingularAttribute.class,
javax/persistence/metamodel/StaticMetamodel.class,
javax/persistence/metamodel/Type.class,
javax/persistence/criteria/AbstractQuery.class,
javax/persistence/criteria/CollectionJoin.class,
javax/persistence/criteria/CriteriaQuery.class,
javax/persistence/criteria/Expression.class,
javax/persistence/criteria/Fetch.class,
javax/persistence/criteria/FetchParent.class,
javax/persistence/criteria/From.class,
javax/persistence/criteria/Join.class,
javax/persistence/criteria/JoinType.class,
javax/persistence/criteria/ListJoin.class,
javax/persistence/criteria/MapJoin.class,
javax/persistence/criteria/Order.class,
javax/persistnece/criteria/ParameterExpression,
javax/persistence/criteria/Path.class,
javax/persistence/criteria/PluralJoin.class,
javax/persistence/criteria/Predicate.class,
javax/persistence/criteria/Root.class,
javax/persistence/criteria/Selection.class,
javax/persistence/criteria/SetJoin.class,
javax/persistence/criteria/Subquery.class,
javax/persistence/ConstructorResult.class,
javax/persistence/NamedStoredProcedureQueries.class,
javax/persistence/NamedStoredProcedureQuery.class,
javax/persistence/ParameterMode.class,
javax/persistence/StoredProcedureParameter.class,
javax/persistence/StoredProcedureQuery.class,
javax/persistence/SynchronizationType.class,
javax/persistence/AttributeConverter.class,
javax/persistence/ConstraintMode.class,
javax/persistence/Convert.class,
javax/persistence/Converter.class,
javax/persistence/Converts.class,
javax/persistence/ForeignKey.class,
javax/persistence/Index.class,
javax/persistence/AttributeNode.class,
javax/persistence/EntityGraph.class,
javax/persistence/Subgraph.class,
javax/persistence/NamedAttributeNode.class,
javax/persistence/NamedEntityGraph.class,
javax/persistence/NamedEntityGraphs.class,
javax/persistence/NamedSubgraph.class,
javax/persistence/criteria/CommonAbstractQuery.class,
javax/persistence/criteria/CriteriaDelete.class,
javax/persistence/criteria/CriteriaUpdate.class,
javax/persistence/criteria/CommonAbstractCriteria.class
"/>
</jar>
</target>
<target name="verify-eclipselink-jar-packaging">
<property name="custom.tasks.lib" value="${trunk.build.location}/buildsystem/ant_customizations.jar"/>
<property name="custom.echo.task.class" value="org.eclipse.persistence.buildtools.ant.taskdefs.Say"/>
<taskdef name="say" classname="${custom.echo.task.class}" classpath="${custom.tasks.lib}"/>
<resourcecount property="count">
<zipentry archive="${eclipselink.jar}" name="*"/>
</resourcecount>
<echo message="count='${count}'"/>
<condition property="eclipselink.src.exist">
<not>
<equals arg1="${count}" arg2="0"/>
</not>
</condition>
<say message="EclipseLink jar verified! '${eclipselink.src.exist}'" unless="eclipselink.src.exist"/>
<say message="Source exists in EclipseLink jarfile! ${eclipselink.src.exist}" if="eclipselink.src.exist"/>
</target>
<target name="package-eclipselink-bundles">
<delete file="${eclipselink.plugins.install.prefix}${eclipselink.zip.suffix}" failonerror="false"/>
<zip destfile="${eclipselink.plugins.install.prefix}${eclipselink.zip.suffix}">
<!-- Include license files first to ensure the right ones are included -->
<zipfileset dir=".">
<include name="${about-file}"/>
<include name="${readme-file}"/>
<include name="${license-files}"/>
</zipfileset>
<zipfileset dir="${eclipselink.plugins}">
<include name="**.jar"/>
<exclude name="javax.persistence*.jar"/>
<exclude name="*nosql*"/>
<exclude name="osgi.cmpn_4.1.0.jar"/>