diff options
author | Jaikiran Pai <jaikiran@apache.org> | 2021-11-28 19:53:20 +0530 |
---|---|---|
committer | Jaikiran Pai <jaikiran@apache.org> | 2021-11-28 19:53:20 +0530 |
commit | f3e3345e8af2b117e79757690644a04bb584bf82 (patch) | |
tree | 7a356857b90d5cac2877735de8ece37f56f2920f | |
parent | 5086264e00fb26b96915eb57d347a3473ca5ea85 (diff) | |
download | ant-f3e3345e8af2b117e79757690644a04bb584bf82.tar.gz |
launch Ant project tests by passing java.security.manager=allow on Java 18
-rw-r--r-- | build.xml | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1756,6 +1756,9 @@ ${antunit.reports} <javaversion atleast="9"/> </not> </condition> + <condition property="java.security.manager" value="allow"> + <javaversion exactly="18"/> + </condition> <macrodef name="test-junit"> <element name="junit-nested" implicit="true"/> <sequential> @@ -1806,6 +1809,13 @@ ${antunit.reports} <syspropertyset> <propertyref name="sun.io.useCanonCaches"/> </syspropertyset> + <!-- Many JUnit tests, in the Ant project, launch Java programs through Ant's + java task, which internally calls System.setSecurityManager(). In Java 18 + an explicit system property value needs to be set to prevent exception from + being thrown from that call --> + <syspropertyset> + <propertyref name="java.security.manager"/> + </syspropertyset> <classpath> <path refid="tests-runtime-classpath"/> <pathelement location="${junit.collector.dir}"/> |