Skip to content

Commit 6be0396

Browse files
committed
org.eclipse.persistence.testing.tests.security.SecurityTestModel conditional execution for < JDK21
Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
1 parent 9bc6d2c commit 6be0396

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

foundation/eclipselink.core.test/antbuild.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,14 @@
5656
* e.g. ${env.XXX}.
5757
* - Ant properties are lower case.
5858
-->
59-
<project name="eclipselink.core.test" default="build" basedir=".">
59+
<project name="eclipselink.core.test" default="build" basedir="." xmlns:if="ant:if">
6060

6161
<echo message="CORETEST_BEGINS..."/>
6262
<available file="../${ant.project.name}" type="dir" property="core_test.is.local"/>
6363
<fail message="Not running from '${ant.project.name}' directory" unless="core_test.is.local"/>
64+
<condition property="is.less.21.jdk" value="true" else="false">
65+
<matches string="${java.version}" pattern="1.(?:[8-9]|[1-9]\d)(?:.\d+)*.*|9.*|1(?:[0-7]).*"/>
66+
</condition>
6467

6568
<!-- Default ant target, compiles and translates resources, does not run tests. -->
6669
<target name="build" depends="clean, compile, package" description="build EclipseLink core tests"/>
@@ -562,9 +565,10 @@
562565

563566
<!-- Default test target, runs test.class from test.properties (default is LRG). -->
564567
<target name="test" depends="init-testing">
568+
<echo message="is.less.21.jdk: ${is.less.21.jdk}"/>
565569
<test include="**/junit/**/*Test.java"/>
566570
<test include="${test.class}"/>
567-
<test include="org.eclipse.persistence.testing.tests.security.SecurityTestModel"/>
571+
<test include="org.eclipse.persistence.testing.tests.security.SecurityTestModel" if:true="${is.less.21.jdk}"/>
568572
<generate-report/>
569573
</target>
570574

0 commit comments

Comments
 (0)