|
|
@@ -119,7 +119,43 @@ is divided into following sections:
|
|
119
|
119
|
<property name="module.name" value=""/>
|
|
120
|
120
|
</target>
|
|
121
|
121
|
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
|
|
122
|
|
- <property name="platform.java" value="${java.home}/bin/java"/>
|
|
|
122
|
+ <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/>
|
|
|
123
|
+ <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/>
|
|
|
124
|
+ <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/>
|
|
|
125
|
+ <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/>
|
|
|
126
|
+ <condition property="platform.javac" value="${platform.home}/bin/javac">
|
|
|
127
|
+ <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/>
|
|
|
128
|
+ </condition>
|
|
|
129
|
+ <property name="platform.javac" value="${platform.javac.tmp}"/>
|
|
|
130
|
+ <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/>
|
|
|
131
|
+ <condition property="platform.java" value="${platform.home}/bin/java">
|
|
|
132
|
+ <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/>
|
|
|
133
|
+ </condition>
|
|
|
134
|
+ <property name="platform.java" value="${platform.java.tmp}"/>
|
|
|
135
|
+ <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/>
|
|
|
136
|
+ <condition property="platform.javadoc" value="${platform.home}/bin/javadoc">
|
|
|
137
|
+ <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/>
|
|
|
138
|
+ </condition>
|
|
|
139
|
+ <property name="platform.javadoc" value="${platform.javadoc.tmp}"/>
|
|
|
140
|
+ <condition property="platform.invalid" value="true">
|
|
|
141
|
+ <or>
|
|
|
142
|
+ <contains string="${platform.javac}" substring="$${platforms."/>
|
|
|
143
|
+ <contains string="${platform.java}" substring="$${platforms."/>
|
|
|
144
|
+ <contains string="${platform.javadoc}" substring="$${platforms."/>
|
|
|
145
|
+ </or>
|
|
|
146
|
+ </condition>
|
|
|
147
|
+ <fail unless="platform.home">Must set platform.home</fail>
|
|
|
148
|
+ <fail unless="platform.bootcp">Must set platform.bootcp</fail>
|
|
|
149
|
+ <fail unless="platform.java">Must set platform.java</fail>
|
|
|
150
|
+ <fail unless="platform.javac">Must set platform.javac</fail>
|
|
|
151
|
+ <fail if="platform.invalid">
|
|
|
152
|
+ The J2SE Platform is not correctly set up.
|
|
|
153
|
+ Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files.
|
|
|
154
|
+ Either open the project in the IDE and setup the Platform with the same name or add it manually.
|
|
|
155
|
+ For example like this:
|
|
|
156
|
+ ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.${platform.active}.home" in a .properties file)
|
|
|
157
|
+ or ant -Dplatforms.${platform.active}.home=<path_to_JDK_home> jar (where no properties file is used)
|
|
|
158
|
+ </fail>
|
|
123
|
159
|
<available file="${manifest.file}" property="manifest.available"/>
|
|
124
|
160
|
<condition property="splashscreen.available">
|
|
125
|
161
|
<and>
|
|
|
@@ -242,20 +278,6 @@ is divided into following sections:
|
|
242
|
278
|
<condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
|
|
243
|
279
|
<isset property="profile.available"/>
|
|
244
|
280
|
</condition>
|
|
245
|
|
- <condition else="false" property="jdkBug6558476">
|
|
246
|
|
- <and>
|
|
247
|
|
- <matches pattern="1\.[56]" string="${java.specification.version}"/>
|
|
248
|
|
- <not>
|
|
249
|
|
- <os family="unix"/>
|
|
250
|
|
- </not>
|
|
251
|
|
- </and>
|
|
252
|
|
- </condition>
|
|
253
|
|
- <condition else="false" property="javac.fork">
|
|
254
|
|
- <or>
|
|
255
|
|
- <istrue value="${jdkBug6558476}"/>
|
|
256
|
|
- <istrue value="${javac.external.vm}"/>
|
|
257
|
|
- </or>
|
|
258
|
|
- </condition>
|
|
259
|
281
|
<property name="jar.index" value="false"/>
|
|
260
|
282
|
<property name="jar.index.metainf" value="${jar.index}"/>
|
|
261
|
283
|
<property name="copylibs.rebase" value="true"/>
|
|
|
@@ -343,7 +365,7 @@ is divided into following sections:
|
|
343
|
365
|
</path>
|
|
344
|
366
|
</resourcecount>
|
|
345
|
367
|
</condition>
|
|
346
|
|
- <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
|
|
|
368
|
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
|
|
347
|
369
|
<src>
|
|
348
|
370
|
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
|
|
349
|
371
|
<include name="*"/>
|
|
|
@@ -394,7 +416,7 @@ is divided into following sections:
|
|
394
|
416
|
<property location="${build.dir}/empty" name="empty.dir"/>
|
|
395
|
417
|
<mkdir dir="${empty.dir}"/>
|
|
396
|
418
|
<mkdir dir="@{apgeneratedsrcdir}"/>
|
|
397
|
|
- <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
|
|
|
419
|
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
|
|
398
|
420
|
<src>
|
|
399
|
421
|
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
|
|
400
|
422
|
<include name="*"/>
|
|
|
@@ -436,7 +458,7 @@ is divided into following sections:
|
|
436
|
458
|
<sequential>
|
|
437
|
459
|
<property location="${build.dir}/empty" name="empty.dir"/>
|
|
438
|
460
|
<mkdir dir="${empty.dir}"/>
|
|
439
|
|
- <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
|
|
|
461
|
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
|
|
440
|
462
|
<src>
|
|
441
|
463
|
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
|
|
442
|
464
|
<include name="*"/>
|
|
|
@@ -515,7 +537,7 @@ is divided into following sections:
|
|
515
|
537
|
<element name="customizePrototype" optional="true"/>
|
|
516
|
538
|
<sequential>
|
|
517
|
539
|
<property name="junit.forkmode" value="perTest"/>
|
|
518
|
|
- <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
|
|
540
|
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}">
|
|
519
|
541
|
<syspropertyset>
|
|
520
|
542
|
<propertyref prefix="test-sys-prop."/>
|
|
521
|
543
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
|
@@ -543,7 +565,7 @@ is divided into following sections:
|
|
543
|
565
|
<element name="customizePrototype" optional="true"/>
|
|
544
|
566
|
<sequential>
|
|
545
|
567
|
<property name="junit.forkmode" value="perTest"/>
|
|
546
|
|
- <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
|
|
|
568
|
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}">
|
|
547
|
569
|
<syspropertyset>
|
|
548
|
570
|
<propertyref prefix="test-sys-prop."/>
|
|
549
|
571
|
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
|
@@ -619,7 +641,7 @@ is divided into following sections:
|
|
619
|
641
|
</fileset>
|
|
620
|
642
|
</union>
|
|
621
|
643
|
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
|
|
622
|
|
- <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="GenesisAPI" testname="TestNG tests" workingDir="${work.dir}">
|
|
|
644
|
+ <testng classfilesetref="test.set" failureProperty="tests.failed" jvm="${platform.java}" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="GenesisAPI" testname="TestNG tests" workingDir="${work.dir}">
|
|
623
|
645
|
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
|
|
624
|
646
|
<propertyset>
|
|
625
|
647
|
<propertyref prefix="test-sys-prop."/>
|
|
|
@@ -850,6 +872,9 @@ is divided into following sections:
|
|
850
|
872
|
<classpath>
|
|
851
|
873
|
<path path="@{classpath}"/>
|
|
852
|
874
|
</classpath>
|
|
|
875
|
+ <bootclasspath>
|
|
|
876
|
+ <path path="${platform.bootcp}"/>
|
|
|
877
|
+ </bootclasspath>
|
|
853
|
878
|
</nbjpdastart>
|
|
854
|
879
|
</sequential>
|
|
855
|
880
|
</macrodef>
|
|
|
@@ -899,7 +924,7 @@ is divided into following sections:
|
|
899
|
924
|
<attribute default="jvm" name="jvm"/>
|
|
900
|
925
|
<element name="customize" optional="true"/>
|
|
901
|
926
|
<sequential>
|
|
902
|
|
- <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
|
|
|
927
|
+ <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" jvm="${platform.java}" module="@{modulename}">
|
|
903
|
928
|
<classpath>
|
|
904
|
929
|
<path path="@{classpath}"/>
|
|
905
|
930
|
</classpath>
|
|
|
@@ -933,7 +958,7 @@ is divided into following sections:
|
|
933
|
958
|
<attribute default="jvm" name="jvm"/>
|
|
934
|
959
|
<element name="customize" optional="true"/>
|
|
935
|
960
|
<sequential>
|
|
936
|
|
- <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
|
|
|
961
|
+ <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" jvm="${platform.java}">
|
|
937
|
962
|
<classpath>
|
|
938
|
963
|
<path path="@{classpath}"/>
|
|
939
|
964
|
</classpath>
|
|
|
@@ -965,7 +990,7 @@ is divided into following sections:
|
|
965
|
990
|
<attribute default="jvm" name="jvm"/>
|
|
966
|
991
|
<element name="customize" optional="true"/>
|
|
967
|
992
|
<sequential>
|
|
968
|
|
- <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
|
|
|
993
|
+ <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" jvm="${platform.java}">
|
|
969
|
994
|
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
970
|
995
|
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
|
971
|
996
|
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
|
|
@@ -1199,7 +1224,7 @@ is divided into following sections:
|
|
1199
|
1224
|
<j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
|
|
1200
|
1225
|
<echo level="info">To run this application from the command line without Ant, try:</echo>
|
|
1201
|
1226
|
<property location="${dist.jar}" name="dist.jar.resolved"/>
|
|
1202
|
|
- <echo level="info">java -jar "${dist.jar.resolved}"</echo>
|
|
|
1227
|
+ <echo level="info">${platform.java} -jar "${dist.jar.resolved}"</echo>
|
|
1203
|
1228
|
</target>
|
|
1204
|
1229
|
<target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
|
|
1205
|
1230
|
<j2seproject1:jar manifest="${tmp.manifest.file}"/>
|
|
|
@@ -1301,8 +1326,8 @@ is divided into following sections:
|
|
1301
|
1326
|
<isset property="main.class.available"/>
|
|
1302
|
1327
|
</and>
|
|
1303
|
1328
|
</condition>
|
|
1304
|
|
- <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
|
|
1305
|
|
- <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
|
|
|
1329
|
+ <property name="platform.jlink" value="${platform.home}/bin/jlink"/>
|
|
|
1330
|
+ <property name="jlink.systemmodules.internal" value="${platform.home}/jmods"/>
|
|
1306
|
1331
|
<exec executable="${platform.jlink}">
|
|
1307
|
1332
|
<arg value="--module-path"/>
|
|
1308
|
1333
|
<arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
|
|
|
@@ -1495,16 +1520,19 @@ is divided into following sections:
|
|
1495
|
1520
|
</not>
|
|
1496
|
1521
|
</and>
|
|
1497
|
1522
|
</condition>
|
|
|
1523
|
+ <exec executable="${platform.java}" failonerror="false" outputproperty="platform.version.output">
|
|
|
1524
|
+ <arg value="-version"/>
|
|
|
1525
|
+ </exec>
|
|
1498
|
1526
|
<condition else="" property="bug5101868workaround" value="*.java">
|
|
1499
|
|
- <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
|
|
|
1527
|
+ <matches multiline="true" pattern="1\.[56](\..*)?" string="${platform.version.output}"/>
|
|
1500
|
1528
|
</condition>
|
|
1501
|
1529
|
<condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
|
|
1502
|
1530
|
<and>
|
|
1503
|
1531
|
<isset property="javadoc.html5"/>
|
|
1504
|
|
- <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
|
|
|
1532
|
+ <available file="${platform.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
|
|
1505
|
1533
|
</and>
|
|
1506
|
1534
|
</condition>
|
|
1507
|
|
- <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
|
|
|
1535
|
+ <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" executable="${platform.javadoc}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
|
|
1508
|
1536
|
<classpath>
|
|
1509
|
1537
|
<path path="${javac.classpath}"/>
|
|
1510
|
1538
|
</classpath>
|