--- a/nashorn/make/build.xml Wed Jul 05 22:44:47 2017 +0200
+++ b/nashorn/make/build.xml Tue Jan 24 18:08:04 2017 +0530
@@ -394,6 +394,18 @@
</target>
+ <target name="generate-security-config" depends="generate-policy-file, generate-security-properties-file"/>
+
+ <target name="generate-security-properties-file" depends="prepare">
+ <echo file="${build.dir}/nashorn.security.properties">
+
+package.access=sun.misc.,\
+ sun.reflect.,\
+ jdk.nashorn.internal.
+
+ </echo>
+ </target>
+
<target name="generate-policy-file" depends="prepare">
<echo file="${build.dir}/nashorn.policy">
@@ -600,7 +612,7 @@
<target name="test" depends="prepare, javadoc, test-pessimistic, test-optimistic"/>
- <target name="test-optimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+ <target name="test-optimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
<echo message="Running test suite in OPTIMISTIC mode..."/>
<antcall target="-test-nosecurity" inheritRefs="true">
<param name="optimistic" value="true"/>
@@ -612,7 +624,7 @@
</antcall>
</target>
- <target name="test-pessimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+ <target name="test-pessimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
<echo message="Running test suite in PESSIMISTIC mode..."/>
<antcall target="-test-nosecurity" inheritRefs="true">
<param name="optimistic" value="false"/>
@@ -655,7 +667,7 @@
</testng>
</target>
- <target name="testmarkdown" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+ <target name="testmarkdown" depends="jar, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
<fileset id="test.classes" dir="${build.test.classes.dir}">
<include name="**/framework/*Test.class"/>
</fileset>
@@ -673,7 +685,7 @@
</testng>
</target>
- <target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+ <target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
<fileset id="test.classes" dir="${build.test.classes.dir}">
<include name="**/framework/*Test.class"/>
</fileset>
@@ -696,7 +708,7 @@
<target name="test262parallel" depends="test262-parallel"/>
- <target name="test262-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+ <target name="test262-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
<!-- use just build.test.classes.dir to avoid referring to TestNG -->
<java classname="${parallel.test.runner}" dir="${basedir}" fork="true" failonerror="true">
<jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
@@ -714,7 +726,7 @@
<target name="testparallel" depends="test-parallel"/>
- <target name="test-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+ <target name="test-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-security-config" if="testng.available">
<!-- use just build.test.classes.dir to avoid referring to TestNG -->
<java classname="${parallel.test.runner}" dir="${basedir}"
failonerror="true"