Skip to content

Commit ee22c9c

Browse files
authored
Ant build - MOXy tests fix 2.0 (#1908)
* Revert "Ant build - MOXy tests fix (#1907)" This reverts commit 350d193. * Ant build - MOXy tests fix 2.0 Merge JVM arguments from internal store (antbuild.xml) and outside (passed with '-Dadditional.jvmargs=....' command line parameter). There was issue with previous fix, that Ant will initialize undefined property automatically during calls like value="${additional.jvmargs}..." into value '${additional.jvmargs}'. Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
1 parent 350d193 commit ee22c9c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

moxy/eclipselink.moxy.test/antbuild.xml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,13 +541,18 @@
541541
<mkdir dir="${report.dir}/jaxb"/>
542542
<mkdir dir="${build.dir}/${test.dir}/${tmp.dir}"/>
543543
<!-- Can be set e.g. in test.properties to add VM options for a particular platform/driver -->
544-
<property name="additional.jvmargs.merged" value="${additional.jvmargs} -Ddummy2=dummy --add-opens java.base/java.math=ALL-UNNAMED"/>
544+
<property name="additional.jvmargs" value="--add-opens java.base/java.math=ALL-UNNAMED"/>
545+
<condition property="additional.jvmargs.merged.internal"
546+
value="${additional.jvmargs} --add-opens java.base/java.math=ALL-UNNAMED"
547+
else="--add-opens java.base/java.math=ALL-UNNAMED">
548+
<isset property="additional.jvmargs"/>
549+
</condition>
545550
<junit jvm="${test.junit.jvm.exec}" failureproperty="junit.failed.jaxb" logfailedtests="true"
546551
printsummary="yes" fork="true" dir="${build.dir}/${test.dir}" tempdir="${build.dir}/${test.dir}" showoutput="yes" maxmemory="1024m">
547552
<!--<jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"/>-->
548553
<jvmarg value="-ea"/>
549554
<jvmarg value="-javaagent:${jmockit.lib}"/>
550-
<jvmarg line="${additional.jvmargs.merged}"/>
555+
<jvmarg line="${additional.jvmargs.merged.internal}"/>
551556
<env key="T_WORK" value="${tmp.dir}"/>
552557
<sysproperty key="platformType" value="SAX"/>
553558
<sysproperty key="metadataType" value="JAVA"/>
@@ -619,11 +624,11 @@
619624
<mkdir dir="${report.dir}/srg/jaxb"/>
620625
<mkdir dir="${build.dir}/${test.dir}/${tmp.dir}"/>
621626
<!-- Can be set e.g. in test.properties to add VM options for a particular platform/driver -->
622-
<property name="additional.jvmargs.merged" value="${additional.jvmargs} -Ddummy2=dummy"/>
627+
<property name="additional.jvmargs" value="-Ddummy2=dummy"/>
623628
<junit jvm="${test.junit.jvm.exec}" failureproperty="junit.failed.jaxb_srg" logfailedtests="true"
624629
printsummary="yes" fork="true" dir="${build.dir}/${test.dir}" tempdir="${build.dir}/${test.dir}" showoutput="yes" maxmemory="1024m">
625630
<jvmarg value="-ea"/>
626-
<jvmarg line="${additional.jvmargs.merged}"/>
631+
<jvmarg line="${additional.jvmargs}"/>
627632
<env key="T_WORK" value="${tmp.dir}"/>
628633
<sysproperty key="platformType" value="SAX"/>
629634
<sysproperty key="metadataType" value="JAVA"/>

0 commit comments

Comments
 (0)