db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1826417 [3/3] - in /db/derby/code/trunk: ./ java/build/org/apache/derbyBuild/ java/build/org/apache/derbyBuild/lastgoodjarcontents/ java/build/org/apache/derbyPreBuild/ java/client/ java/demo/ java/demo/toursdb/ java/drda/ java/engine/ jav...
Date Sat, 10 Mar 2018 16:24:01 GMT
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/no_derby_internals.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/no_derby_internals.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/no_derby_internals.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/no_derby_internals.policy Sat Mar 10 16:24:00 2018
@@ -44,7 +44,7 @@
 //
 // Permissions for the embedded engine (derby.jar)
 //
-grant codeBase "${derbyTesting.codejar}derby.jar" {
+grant codeBase "${derbyTesting.engine}" {
   permission java.util.PropertyPermission "derby.*", "read";
   permission java.util.PropertyPermission "derby.storage.jvmInstanceId", 
       "write"; 
@@ -145,7 +145,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the network server (derbynet.jar)
 //
-grant codeBase "${derbyTesting.codejar}derbynet.jar" {
+grant codeBase "${derbyTesting.netserver}" {
   permission java.util.PropertyPermission "java.class.path", "read";//sysinfo
   permission java.util.PropertyPermission "java.runtime.version", "read";//sysinfo
   permission java.util.PropertyPermission "java.fullversion", "read";//sysinfo
@@ -181,7 +181,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the network client (derbyclient.jar)
 //
-grant codeBase "${derbyTesting.clientjar}derbyclient.jar" {
+grant codeBase "${derbyTesting.client}" {
   permission java.net.SocketPermission "127.0.0.1", "connect,resolve";
   permission java.net.SocketPermission "localhost", "connect,resolve";
   permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";
@@ -213,7 +213,7 @@ grant codeBase "${derbyTesting.clientjar
 // Ideally this would be more secure, for now the
 // focus is on getting the engine & network server secure.
 //
-grant codeBase "${derbyTesting.codejar}derbytools.jar" {
+grant codeBase "${derbyTesting.tools}" {
   // Access all properties using System.getProperties -
   // ij enumerates the properties in order to open connections
   // for any property set in ij.connection.* and set protocols
@@ -237,7 +237,7 @@ grant codeBase "${derbyTesting.codejar}d
 // We are liberal here, it's not a goal to make the test harness
 // or tests secure.
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Access all properties using System.getProperties
   permission java.util.PropertyPermission "*", "read, write";
   
@@ -305,96 +305,6 @@ grant codeBase "${derbyTesting.testjar}d
   permission java.io.FilePermission "${java.home}${/}..${/}bin${/}-", "execute, read";
 };
 
-//
-// super-set of the jar permissions for running out of the classes directory
-//
-grant codeBase "${derbyTesting.codeclasses}" {
-  // Access all properties using System.getProperties
-  permission java.util.PropertyPermission "*", "read, write";
-  
-  permission java.util.PropertyPermission "derby.*", "read";
-  permission java.lang.RuntimePermission "createClassLoader";
-
-  // permissions so that we can set the context class loader to
-  // null for daemon threads to avoid class loader leak.
-  // DERBY-3745
-  permission java.lang.RuntimePermission "getClassLoader";
-  permission java.lang.RuntimePermission "setContextClassLoader";
-
-  permission java.security.SecurityPermission "getPolicy";
-   
-  permission java.io.FilePermission "${derby.system.home}${/}derby.properties", "read";
-  permission java.io.FilePermission "${derby.system.home}${/}derby.log", "read, write, delete";
-  permission java.io.FilePermission "${derby.system.home}", "read";
-  permission java.io.FilePermission "${derby.system.home}${/}-", "read, write, delete";
-
-  // combination of client and server side.
-  permission java.net.SocketPermission "127.0.0.1", "accept,connect,resolve";
-  permission java.net.SocketPermission "localhost", "accept,connect,resolve,listen";
-  permission java.net.SocketPermission "${derbyTesting.clienthost}", "accept,connect";
-  permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";
-  
-  // Access all files under ${user.dir}to write the test directory structure
-  // Also covers extin, extout and extinout locations
-  permission java.io.FilePermission "${user.dir}${/}-", "read,write,delete"; 
-   
-  // Tests need to be able to exec a java program. DERBY-6295: Also give them
-  // read permission so that detailed error message is shown.
-  permission java.io.FilePermission "${java.home}${/}-", "execute, read";
-
-  // needed to create a temp file in order to open a database in a jar file
-  permission java.io.FilePermission "${java.io.tmpdir}${/}-", "read,write,delete";
-
-  // These permissions are needed to load the JCE for encryption with Sun and IBM JDK131.
-  // JDK14 has the JCE  preloaded
-  permission java.security.SecurityPermission "insertProvider.SunJCE";
-  permission java.security.SecurityPermission "insertProvider.IBMJCE";
-
-  // When running with useprocess=false need to install and uninstall
-  // the security manager and allow setIO to change the system err and out
-  // streams. Currently the nist suite runs with useprocess=false.
-  permission java.lang.RuntimePermission "setSecurityManager";
-  permission java.lang.RuntimePermission "setIO"; 
-
-  // These permissions are needed by stress.multi to dump the thread stack
-  // traces upon failure.
-  permission java.lang.RuntimePermission "getStackTrace";
-  permission java.lang.RuntimePermission "modifyThreadGroup";
-  
-    // Allow MBeanTest to register the application management MBean.
-  permission javax.management.MBeanServerPermission "createMBeanServer";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.Management#[org.apache.derby:type=Management]","registerMBean,unregisterMBean";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.Management#-[-]", "instantiate";
-  permission javax.management.MBeanTrustPermission "register";
-  
-  // Allows access to Derby's built-in MBeans, within the domain org.apache.derby.
-  permission javax.management.MBeanPermission "org.apache.derby.*#[org.apache.derby:*]","registerMBean,unregisterMBean";
-  
-   
-  // And to find and use Derby's MBeans
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#[org.apache.derby:*]", "getAttribute,setAttribute,invoke";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#-[org.apache.derby:*]", "getMBeanInfo";
-  permission javax.management.MBeanPermission "-#-[-]", "queryNames";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#-[org.apache.derby:*]", "queryNames";
-  
-  // Test code needs this as well for the platform MBeanServer
-  // tests where the testing code is in the stack frame.
-  permission org.apache.derby.shared.common.security.SystemPermission "jmx", "control";
-  permission org.apache.derby.shared.common.security.SystemPermission "engine", "monitor";
-  permission org.apache.derby.shared.common.security.SystemPermission "server", "control,monitor";
-
-  // Needed by FileUtil#limitAccessToOwner
-  permission java.lang.RuntimePermission "accessUserInformation";
-  permission java.lang.RuntimePermission "getFileStoreAttributes";
-
-  // This permission is needed to call DriverManager.deregisterDriver()
-  // on Java SE 8 and later.
-  permission java.sql.SQLPermission "deregisterDriver";
-
-  // Needed by ClasspathSetup for freeing resources.
-  permission java.lang.RuntimePermission "closeClassLoader";
-};
-
 // JUnit jar file tries to read junit.properties in the user's
 // home directory and seems to require permission to read the
 // property user.home as well.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/resultSetReader.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/resultSetReader.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/resultSetReader.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/resultSetReader.policy Sat Mar 10 16:24:00 2018
@@ -29,7 +29,7 @@
 //
 // Permissions for the embedded engine (derby.jar)
 //
-grant codeBase "${derbyTesting.codejar}derby.jar" {
+grant codeBase "${derbyTesting.engine}" {
   permission java.util.PropertyPermission "derby.*", "read";
   permission java.util.PropertyPermission "derby.storage.jvmInstanceId", 
       "write"; 
@@ -133,7 +133,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the network server (derbynet.jar)
 //
-grant codeBase "${derbyTesting.codejar}derbynet.jar" {
+grant codeBase "${derbyTesting.netserver}" {
   permission java.util.PropertyPermission "java.class.path", "read";//sysinfo
   permission java.util.PropertyPermission "java.runtime.version", "read";//sysinfo
   permission java.util.PropertyPermission "java.fullversion", "read";//sysinfo
@@ -168,7 +168,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the network client (derbyclient.jar)
 //
-grant codeBase "${derbyTesting.clientjar}derbyclient.jar" {
+grant codeBase "${derbyTesting.client}" {
   permission java.net.SocketPermission "127.0.0.1", "connect,resolve";
   permission java.net.SocketPermission "localhost", "connect,resolve";
   permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";
@@ -200,7 +200,7 @@ grant codeBase "${derbyTesting.clientjar
 // Ideally this would be more secure, for now the
 // focus is on getting the engine & network server secure.
 //
-grant codeBase "${derbyTesting.codejar}derbytools.jar" {
+grant codeBase "${derbyTesting.tools}" {
   // Access all properties using System.getProperties -
   // ij enumerates the properties in order to open connections
   // for any property set in ij.connection.* and set protocols
@@ -224,7 +224,7 @@ grant codeBase "${derbyTesting.codejar}d
 // We are liberal here, it's not a goal to make the test harness
 // or tests secure.
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Access all properties using System.getProperties
   permission java.util.PropertyPermission "*", "read, write";
 
@@ -283,95 +283,6 @@ grant codeBase "${derbyTesting.testjar}d
   permission java.lang.RuntimePermission "getFileStoreAttributes";
 };
 
-//
-// super-set of the jar permissions for running out of the classes directory
-//
-grant codeBase "${derbyTesting.codeclasses}" {
-  // Access all properties using System.getProperties
-  permission java.util.PropertyPermission "*", "read, write";
-  
-  permission java.util.PropertyPermission "derby.*", "read";
-  permission java.lang.RuntimePermission "createClassLoader";
-
-  // permissions so that we can set the context class loader to
-  // null for daemon threads to avoid class loader leak.
-  // DERBY-3745
-  permission java.lang.RuntimePermission "getClassLoader";
-  permission java.lang.RuntimePermission "setContextClassLoader";
-
-  permission java.security.SecurityPermission "getPolicy";
-   
-  permission java.io.FilePermission "${derby.system.home}${/}derby.properties", "read";
-  permission java.io.FilePermission "${derby.system.home}${/}derby.log", "read, write, delete";
-  permission java.io.FilePermission "${derby.system.home}", "read";
-  permission java.io.FilePermission "${derby.system.home}${/}-", "read, write, delete";
-
-  // combination of client and server side.
-  permission java.net.SocketPermission "127.0.0.1", "accept,connect,resolve";
-  permission java.net.SocketPermission "localhost", "accept,connect,resolve";
-  permission java.net.SocketPermission "${derbyTesting.clienthost}", "accept,connect";
-  permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";
-  
-  // Access all files under ${user.dir}to write the test directory structure
-  // Also covers extin, extout and extinout locations
-  permission java.io.FilePermission "${user.dir}${/}-", "read,write,delete"; 
-   
-  // Tests need to be able to exec a java program. DERBY-6295: Also give them
-  // read permission so that detailed error message is shown.
-  permission java.io.FilePermission "${java.home}${/}-", "execute, read";
- 
-  // These permissions are needed to load the JCE for encryption with Sun and IBM JDK131.
-  // JDK14 has the JCE  preloaded
-  permission java.security.SecurityPermission "insertProvider.SunJCE";
-  permission java.security.SecurityPermission "insertProvider.IBMJCE";
-
-  // When running with useprocess=false need to install and uninstall
-  // the security manager and allow setIO to change the system err and out
-  // streams. Currently the nist suite runs with useprocess=false.
-  permission java.lang.RuntimePermission "setSecurityManager";
-  permission java.lang.RuntimePermission "setIO"; 
-
-  // These permissions are needed by stress.multi to dump the thread stack
-  // traces upon failure.
-  permission java.lang.RuntimePermission "getStackTrace";
-  permission java.lang.RuntimePermission "modifyThreadGroup";
-  
-    // Allow MBeanTest to register the application management MBean.
-  permission javax.management.MBeanServerPermission "createMBeanServer";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.Management#[org.apache.derby:type=Management]","registerMBean,unregisterMBean";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.Management#-[-]", "instantiate";
-  permission javax.management.MBeanTrustPermission "register";
-  
-  // Allows access to Derby's built-in MBeans, within the domain org.apache.derby.
-  permission javax.management.MBeanPermission "org.apache.derby.*#[org.apache.derby:*]","registerMBean,unregisterMBean";
-  
-   
-  // And to find and use Derby's MBeans
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#[org.apache.derby:*]", "getAttribute,invoke";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#-[org.apache.derby:*]", "getMBeanInfo";
-  permission javax.management.MBeanPermission "-#-[-]", "queryNames";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#-[org.apache.derby:*]", "queryNames";
-  
-  // Test code needs this as well for the platform MBeanServer
-  // tests where the testing code is in the stack frame.
-  permission org.apache.derby.shared.common.security.SystemPermission "jmx", "control";
-  permission org.apache.derby.shared.common.security.SystemPermission "engine", "monitor";
-  permission org.apache.derby.shared.common.security.SystemPermission "server", "control,monitor";
-
-  // Needed by FileUtil#limitAccessToOwner
-  permission java.lang.RuntimePermission "accessUserInformation";
-  permission java.lang.RuntimePermission "getFileStoreAttributes";
-
-  // This permission is needed to call DriverManager.deregisterDriver()
-  // on Java SE 8 and later.
-  permission java.sql.SQLPermission "deregisterDriver";
-  
-  // For reading fields in the ResultSet graph
-  permission java.lang.RuntimePermission "accessDeclaredMembers";
-
-  permission org.apache.derby.shared.common.security.SystemPermission "engine", "usederbyinternals";
-};
-
 // JUnit jar file tries to read junit.properties in the user's
 // home directory and seems to require permission to read the
 // property user.home as well.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/CacheManagerMBeanTest.withPerm.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/CacheManagerMBeanTest.withPerm.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/CacheManagerMBeanTest.withPerm.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/CacheManagerMBeanTest.withPerm.policy Sat Mar 10 16:24:00 2018
@@ -20,7 +20,7 @@
 // and CacheManagerMBeanTest.withoutPerm.policy, is that this file
 // grants SystemPermission("engine", "monitor") to derbyTesting.jar.
 
-grant codeBase "${derbyTesting.codejar}derby.jar"
+grant codeBase "${derbyTesting.engine}"
 {
   // These permissions are needed for everyday, embedded Derby usage.
   //
@@ -45,7 +45,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the tests (derbyTesting.jar)
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Allow tests to install and uninstall the security manager and
   // to refresh the policy
   permission java.util.PropertyPermission "java.security.policy", "read,write";
@@ -94,6 +94,6 @@ grant codeBase "${derbyTesting.antjunit}
     permission java.io.FilePermission "${user.dir}${/}*", "write";
 };
 
-grant codeBase "${derbyTesting.codejar}derbytools.jar" {
+grant codeBase "${derbyTesting.tools}" {
   permission org.apache.derby.shared.common.security.SystemPermission "engine", "usederbyinternals";
 };

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/CacheManagerMBeanTest.withoutPerm.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/CacheManagerMBeanTest.withoutPerm.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/CacheManagerMBeanTest.withoutPerm.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/CacheManagerMBeanTest.withoutPerm.policy Sat Mar 10 16:24:00 2018
@@ -20,7 +20,7 @@
 // and CacheManagerMBeanTest.withPerm.policy, is that this file does not
 // grant SystemPermission("engine", "monitor") to derbyTesting.jar.
 
-grant codeBase "${derbyTesting.codejar}derby.jar"
+grant codeBase "${derbyTesting.engine}"
 {
   // These permissions are needed for everyday, embedded Derby usage.
   //
@@ -45,7 +45,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the tests (derbyTesting.jar)
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Allow tests to install and uninstall the security manager and
   // to refresh the policy
   permission java.util.PropertyPermission "java.security.policy", "read,write";
@@ -92,7 +92,7 @@ grant codeBase "${derbyTesting.antjunit}
     permission java.io.FilePermission "${user.dir}${/}*", "write";
 };
 
-grant codeBase "${derbyTesting.codejar}derbytools.jar" {
+grant codeBase "${derbyTesting.tools}" {
   permission org.apache.derby.shared.common.security.SystemPermission "engine", "usederbyinternals";
 };
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/Derby5937SlaveShutdownTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/Derby5937SlaveShutdownTest.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/Derby5937SlaveShutdownTest.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/Derby5937SlaveShutdownTest.policy Sat Mar 10 16:24:00 2018
@@ -23,7 +23,7 @@
 // The permissions below are expected to be added to the set of default
 // permissions granted to the test framework.
 //
-grant codeBase "${derbyTesting.codejar}derby.jar" {
+grant codeBase "${derbyTesting.engine}" {
   permission java.net.SocketPermission "127.0.0.1", "connect,accept,listen";
   permission java.net.SocketPermission "localhost", "connect,accept,listen";
 };

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby3980DeadlockTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby3980DeadlockTest.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby3980DeadlockTest.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby3980DeadlockTest.policy Sat Mar 10 16:24:00 2018
@@ -45,7 +45,7 @@
 //
 // Permissions for the embedded engine (derby.jar)
 //
-grant codeBase "${derbyTesting.codejar}derby.jar" {
+grant codeBase "${derbyTesting.engine}" {
   permission java.util.PropertyPermission "derby.*", "read";
   permission java.util.PropertyPermission "derby.storage.jvmInstanceId", 
       "write"; 
@@ -134,7 +134,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the network server (derbynet.jar)
 //
-grant codeBase "${derbyTesting.codejar}derbynet.jar" {
+grant codeBase "${derbyTesting.netserver}" {
   permission java.util.PropertyPermission "java.class.path", "read";//sysinfo
   permission java.util.PropertyPermission "java.runtime.version", "read";//sysinfo
   permission java.util.PropertyPermission "java.fullversion", "read";//sysinfo
@@ -159,7 +159,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the network client (derbyclient.jar)
 //
-grant codeBase "${derbyTesting.clientjar}derbyclient.jar" {
+grant codeBase "${derbyTesting.client}" {
   permission java.net.SocketPermission "127.0.0.1", "connect,resolve";
   permission java.net.SocketPermission "localhost", "connect,resolve";
   permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";
@@ -188,7 +188,7 @@ grant codeBase "${derbyTesting.clientjar
 // Ideally this would be more secure, for now the
 // focus is on getting the engine & network server secure.
 //
-grant codeBase "${derbyTesting.codejar}derbytools.jar" {
+grant codeBase "${derbyTesting.tools}" {
   // Access all properties using System.getProperties -
   // ij enumerates the properties in order to open connections
   // for any property set in ij.connection.* and set protocols
@@ -212,7 +212,7 @@ grant codeBase "${derbyTesting.codejar}d
 // We are liberal here, it's not a goal to make the test harness
 // or tests secure.
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Access all properties using System.getProperties
   permission java.util.PropertyPermission "*", "read, write";
   
@@ -256,86 +256,6 @@ grant codeBase "${derbyTesting.testjar}d
   permission java.net.SocketPermission "localhost", "listen";
 };
 
-//
-// super-set of the jar permissions for running out of the classes directory
-//
-grant codeBase "${derbyTesting.codeclasses}" {
-  // Access all properties using System.getProperties
-  permission java.util.PropertyPermission "*", "read, write";
-  
-  permission java.util.PropertyPermission "derby.*", "read";
-  permission java.lang.RuntimePermission "createClassLoader";
-
-  // permissions so that we can set the context class loader to
-  // null for daemon threads to avoid class loader leak.
-  // DERBY-3745
-  permission java.lang.RuntimePermission "getClassLoader";
-  permission java.lang.RuntimePermission "setContextClassLoader";
-
-  permission java.security.SecurityPermission "getPolicy";
-   
-  permission java.io.FilePermission "${derby.system.home}${/}derby.properties", "read";
-  permission java.io.FilePermission "${derby.system.home}${/}derby.log", "read, write, delete";
-  permission java.io.FilePermission "${derby.system.home}", "read";
-  permission java.io.FilePermission "${derby.system.home}${/}-", "read, write, delete";
-
-  //Need to read and delete file for user.dir (Derby3980DeadlockTest)
-  permission java.io.FilePermission "${user.dir}", "read"; 
-  permission java.io.FilePermission "${user.dir}${/}*.txt", "read,write,delete";
-  // Access all files under ${user.dir}to write the test directory structure
-  permission java.io.FilePermission "${user.dir}${/}-", "read,write,delete"; 
-
-  // combination of client and server side.
-  permission java.net.SocketPermission "127.0.0.1", "accept,connect,resolve";
-  permission java.net.SocketPermission "localhost", "accept,connect,resolve,listen";
-  permission java.net.SocketPermission "${derbyTesting.clienthost}", "accept,connect";
-  permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";
-  
-  // Access all files under ${user.dir}to write the test directory structure
-  // Also covers extin, extout and extinout locations
-  permission java.io.FilePermission "${user.dir}${/}-", "read,write,delete"; 
-    
-  // These permissions are needed to load the JCE for encryption with Sun and IBM JDK131.
-  // JDK14 has the JCE  preloaded
-  permission java.security.SecurityPermission "insertProvider.SunJCE";
-  permission java.security.SecurityPermission "insertProvider.IBMJCE";
-
-  // When running with useprocess=false need to install and uninstall
-  // the security manager and allow setIO to change the system err and out
-  // streams. Currently the nist suite runs with useprocess=false.
-  permission java.lang.RuntimePermission "setSecurityManager";
-  permission java.lang.RuntimePermission "setIO"; 
-
-  // These permissions are needed by stress.multi to dump the thread stack
-  // traces upon failure.
-  permission java.lang.RuntimePermission "getStackTrace";
-  permission java.lang.RuntimePermission "modifyThreadGroup";
-  
-    // Allow MBeanTest to register the application management MBean.
-  permission javax.management.MBeanServerPermission "createMBeanServer";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.Management#[org.apache.derby:type=Management]","registerMBean,unregisterMBean";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.Management#-[-]", "instantiate";
-  permission javax.management.MBeanTrustPermission "register";
-  
-  // Allows access to Derby's built-in MBeans, within the domain org.apache.derby.
-  permission javax.management.MBeanPermission "org.apache.derby.*#[org.apache.derby:*]","registerMBean,unregisterMBean";
-  
-   
-  // And to find and use Derby's MBeans
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#[org.apache.derby:*]", "getAttribute,invoke";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#-[org.apache.derby:*]", "getMBeanInfo";
-  permission javax.management.MBeanPermission "-#-[-]", "queryNames";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#-[org.apache.derby:*]", "queryNames";
-  
-  // Test code needs this as well for the platform MBeanServer
-  // tests where the testing code is in the stack frame.
-  permission org.apache.derby.shared.common.security.SystemPermission "jmx", "control";
-  permission org.apache.derby.shared.common.security.SystemPermission "engine", "monitor";
-  permission org.apache.derby.shared.common.security.SystemPermission "server", "control,monitor";
-
-  permission org.apache.derby.shared.common.security.SystemPermission "engine", "usederbyinternals";
-};
-
 // JUnit jar file tries to read junit.properties in the user's
 // home directory and seems to require permission to read the
 // property user.home as well.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/derbyrunjartest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/derbyrunjartest.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/derbyrunjartest.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/derbyrunjartest.policy Sat Mar 10 16:24:00 2018
@@ -15,10 +15,7 @@
 //   limitations under the License.
 //
 
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   permission java.lang.RuntimePermission "getProtectionDomain";
 };
 
-grant codeBase "${derbyTesting.codeclasses}" {
-  permission java.lang.RuntimePermission "getProtectionDomain";
-};

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/fillLog.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/fillLog.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/fillLog.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/fillLog.policy Sat Mar 10 16:24:00 2018
@@ -21,7 +21,7 @@
 //
 // fillLog.policy
 //
-grant codeBase "${derbyTesting.codejar}derby.jar" {
+grant codeBase "${derbyTesting.engine}" {
   // for unit tests
   permission java.util.PropertyPermission "derbyTesting.unittest.*", "read";
 };

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy Sat Mar 10 16:24:00 2018
@@ -23,13 +23,17 @@
 // Policy file with minimal set of permissions to run derby's
 // functional tests.
 //
-// The test harness sets up four variables used by this policy file
+// SecurityManagerSetup sets up several variables used by this policy file.
 //
-// derbyTesting.codejar - URL to the jar files when they are in the classpath
-// derbyTesting.codeclasses - URL to the classes directory when it is in the classpath
+// The following codebases are declared:
 //
-// Only one of derbyTesting.codejar and derbyTesting.codeclasses will be valid, the
-// other will be set to a bogus URL like file://unused
+// derbyTesting.engine - location of the engine jar or class directory
+// derbyTesting.client - location of the client jar or class directory
+// derbyTesting.shared - location of the shared jar or class directory
+// derbyTesting.netserver - location of the server jar or class directory
+// derbyTesting.tools - location of the tools jar or class directory
+// derbyTesting.optionaltools - location of the optional tools jar or class directory
+// derbyTesting.testing - location of the testing jar or class directory
 //
 // derbyTesting.codedir - File location of either derbyTesting.codejar or derbyTesting.codeclasses.
 // Only required due to a BUG (see below for more info).
@@ -45,7 +49,7 @@
 //
 // Permissions for the embedded engine (derby.jar)
 //
-grant codeBase "${derbyTesting.codejar}derby.jar" {
+grant codeBase "${derbyTesting.engine}" {
   permission java.util.PropertyPermission "derby.*", "read";
   permission java.util.PropertyPermission "derby.storage.jvmInstanceId", 
       "write"; 
@@ -146,7 +150,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for shared code (derbyshared.jar)
 //
-grant codeBase "${derbyTesting.codejar}derbyshared.jar" {
+grant codeBase "${derbyTesting.shared}" {
   // These permissions are needed by AssertFailure to dump the thread stack
   // traces upon failure.
   permission java.lang.RuntimePermission "getStackTrace";
@@ -174,7 +178,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the network server (derbynet.jar)
 //
-grant codeBase "${derbyTesting.codejar}derbynet.jar" {
+grant codeBase "${derbyTesting.netserver}" {
   permission java.util.PropertyPermission "java.class.path", "read";//sysinfo
   permission java.util.PropertyPermission "java.runtime.version", "read";//sysinfo
   permission java.util.PropertyPermission "java.fullversion", "read";//sysinfo
@@ -211,7 +215,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the network client (derbyclient.jar)
 //
-grant codeBase "${derbyTesting.clientjar}derbyclient.jar" {
+grant codeBase "${derbyTesting.client}" {
   permission java.net.SocketPermission "127.0.0.1", "connect,resolve";
   permission java.net.SocketPermission "localhost", "connect,resolve";
   permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";
@@ -243,7 +247,7 @@ grant codeBase "${derbyTesting.clientjar
 // Ideally this would be more secure, for now the
 // focus is on getting the engine & network server secure.
 //
-grant codeBase "${derbyTesting.codejar}derbytools.jar" {
+grant codeBase "${derbyTesting.tools}" {
   // Access all properties using System.getProperties -
   // ij enumerates the properties in order to open connections
   // for any property set in ij.connection.* and set protocols
@@ -265,7 +269,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the optional tools (derbyoptionaltools.jar)
 //
-grant codeBase "${derbyTesting.codejar}derbyoptionaltools.jar" {
+grant codeBase "${derbyTesting.optionaltools}" {
 
   // Needed by SimpleJsonTest
   permission java.io.FilePermission "${user.dir}${/}extin${/}-", "read";
@@ -277,7 +281,7 @@ grant codeBase "${derbyTesting.codejar}d
 // We are liberal here, it's not a goal to make the test harness
 // or tests secure.
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Access all properties using System.getProperties
   permission java.util.PropertyPermission "*", "read, write";
   
@@ -348,99 +352,6 @@ grant codeBase "${derbyTesting.testjar}d
   permission java.io.FilePermission "${java.home}${/}..${/}bin${/}-", "execute, read";
 };
 
-//
-// super-set of the jar permissions for running out of the classes directory
-//
-grant codeBase "${derbyTesting.codeclasses}" {
-  // Access all properties using System.getProperties
-  permission java.util.PropertyPermission "*", "read, write";
-  
-  permission java.util.PropertyPermission "derby.*", "read";
-  permission java.lang.RuntimePermission "createClassLoader";
-
-  // Needed for the engine to access its internal structures
-  permission org.apache.derby.shared.common.security.SystemPermission "engine", "usederbyinternals";
-
-  // permissions so that we can set the context class loader to
-  // null for daemon threads to avoid class loader leak.
-  // DERBY-3745
-  permission java.lang.RuntimePermission "getClassLoader";
-  permission java.lang.RuntimePermission "setContextClassLoader";
-
-  permission java.security.SecurityPermission "getPolicy";
-   
-  permission java.io.FilePermission "${derby.system.home}${/}derby.properties", "read";
-  permission java.io.FilePermission "${derby.system.home}${/}derby.log", "read, write, delete";
-  permission java.io.FilePermission "${derby.system.home}", "read";
-  permission java.io.FilePermission "${derby.system.home}${/}-", "read, write, delete";
-
-  // combination of client and server side.
-  permission java.net.SocketPermission "127.0.0.1", "accept,connect,resolve";
-  permission java.net.SocketPermission "localhost", "accept,connect,resolve,listen";
-  permission java.net.SocketPermission "${derbyTesting.clienthost}", "accept,connect";
-  permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";
-  
-  // Access all files under ${user.dir}to write the test directory structure
-  // Also covers extin, extout and extinout locations
-  permission java.io.FilePermission "${user.dir}${/}-", "read,write,delete"; 
-   
-  // Tests need to be able to exec a java program. DERBY-6295: Also give them
-  // read permission so that detailed error message is shown.
-  permission java.io.FilePermission "${java.home}${/}-", "execute, read";
-
-  // needed to create a temp file in order to open a database in a jar file
-  permission java.io.FilePermission "${java.io.tmpdir}${/}-", "read,write,delete";
-
-  // These permissions are needed to load the JCE for encryption with Sun and IBM JDK131.
-  // JDK14 has the JCE  preloaded
-  permission java.security.SecurityPermission "insertProvider.SunJCE";
-  permission java.security.SecurityPermission "insertProvider.IBMJCE";
-
-  // When running with useprocess=false need to install and uninstall
-  // the security manager and allow setIO to change the system err and out
-  // streams. Currently the nist suite runs with useprocess=false.
-  permission java.lang.RuntimePermission "setSecurityManager";
-  permission java.lang.RuntimePermission "setIO"; 
-
-  // These permissions are needed by stress.multi to dump the thread stack
-  // traces upon failure.
-  permission java.lang.RuntimePermission "getStackTrace";
-  permission java.lang.RuntimePermission "modifyThreadGroup";
-  
-    // Allow MBeanTest to register the application management MBean.
-  permission javax.management.MBeanServerPermission "createMBeanServer";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.Management#[org.apache.derby:type=Management]","registerMBean,unregisterMBean";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.Management#-[-]", "instantiate";
-  permission javax.management.MBeanTrustPermission "register";
-  
-  // Allows access to Derby's built-in MBeans, within the domain org.apache.derby.
-  permission javax.management.MBeanPermission "org.apache.derby.*#[org.apache.derby:*]","registerMBean,unregisterMBean";
-  
-   
-  // And to find and use Derby's MBeans
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#[org.apache.derby:*]", "getAttribute,setAttribute,invoke";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#-[org.apache.derby:*]", "getMBeanInfo";
-  permission javax.management.MBeanPermission "-#-[-]", "queryNames";
-  permission javax.management.MBeanPermission "org.apache.derby.mbeans.*#-[org.apache.derby:*]", "queryNames";
-  
-  // Test code needs this as well for the platform MBeanServer
-  // tests where the testing code is in the stack frame.
-  permission org.apache.derby.shared.common.security.SystemPermission "jmx", "control";
-  permission org.apache.derby.shared.common.security.SystemPermission "engine", "monitor";
-  permission org.apache.derby.shared.common.security.SystemPermission "server", "control,monitor";
-
-  // Needed by FileUtil#limitAccessToOwner
-  permission java.lang.RuntimePermission "accessUserInformation";
-  permission java.lang.RuntimePermission "getFileStoreAttributes";
-
-  // This permission is needed to call DriverManager.deregisterDriver()
-  // on Java SE 8 and later.
-  permission java.sql.SQLPermission "deregisterDriver";
-
-  // Needed by ClasspathSetup for freeing resources.
-  permission java.lang.RuntimePermission "closeClassLoader";
-};
-
 // JUnit jar file tries to read junit.properties in the user's
 // home directory and seems to require permission to read the
 // property user.home as well.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/useprocessfalse.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/useprocessfalse.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/useprocessfalse.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/useprocessfalse.policy Sat Mar 10 16:24:00 2018
@@ -18,7 +18,7 @@
 //
 // policy file for running with useprocess=false
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // When running with useprocess=false need to install and uninstall
   // the security manager and allow setIO to change the system err and out
   // streams. Currently the nist suite runs with useprocess=false.
@@ -26,10 +26,3 @@ grant codeBase "${derbyTesting.testjar}d
   permission java.lang.RuntimePermission "setIO"; 
 };
 
-grant codeBase "${derbyTesting.codeclasses}" {
-
-  // the security manager and allow setIO to change the system err and out
-  // streams. Currently the nist suite runs with useprocess=false.
-  permission java.lang.RuntimePermission "setSecurityManager";
-  permission java.lang.RuntimePermission "setIO"; 
-};

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java Sat Mar 10 16:24:00 2018
@@ -54,6 +54,24 @@ public final class SecurityManagerSetup
     /** Constant used to indicate that no security policy is to be installed. */
     static final String NO_POLICY = "<NONE>";
 
+    // codebase variables used in derby_tests.policy
+    public static final String DERBY_ENGINE = "derbyTesting.engine";
+    public static final String DERBY_CLIENT = "derbyTesting.client";
+    public static final String DERBY_SHARED = "derbyTesting.shared";
+    public static final String DERBY_NETSERVER = "derbyTesting.netserver";
+    public static final String DERBY_TOOLS = "derbyTesting.tools";
+    public static final String DERBY_OPTIONAL_TOOLS = "derbyTesting.optionaltools";
+    public static final String DERBY_TESTING = "derbyTesting.testing";
+
+    public static final String TESTING_JUNIT = "derbyTesting.junit";
+    public static final String TESTING_ANTJUNIT = "derbyTesting.antjunit";
+    public static final String TESTING_ANT = "derbyTesting.ant";
+
+    public static final String LUCENE_CORE = "derbyTesting.lucene.core";
+    public static final String JAXP = "derbyTesting.jaxpjar";
+    public static final String PACKAGE_PRIVATE_CLASSES = "derbyTesting.ppcodeclasses";
+  
+  
     /**
      * Does the JVM support Subjects for
      * authorization through Java security manager.
@@ -244,13 +262,14 @@ public final class SecurityManagerSetup
 
 	private static void installSecurityManager(String policyFile, final SecurityManager sm)
 			 {
-	    
 		if (externalSecurityManagerInstalled)
 			return;
 		
 		Properties set = new Properties(classPathSet);
 		setSecurityPolicy(set, policyFile);
-
+		for (Enumeration e = set.propertyNames(); e.hasMoreElements();) {
+			String key = (String) e.nextElement();
+		}
 		SecurityManager currentsm = System.getSecurityManager();
 		if (currentsm != null) {
 			// SecurityManager installed, see if it has the same settings.
@@ -356,25 +375,18 @@ public final class SecurityManagerSetup
 
 		//We need the junit classes to instantiate this class, so the
 		//following should not cause runtime errors.
-        URL junit = getURL(junit.framework.Test.class);
-        if (junit != null)
-            classPathSet.setProperty("derbyTesting.junit", junit.toExternalForm());
+        setCodebase(TESTING_JUNIT, getURL(junit.framework.Test.class));
 	
         // Load indirectly so we don't need ant-junit.jar at compile time.
-        URL antjunit = getURL("org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner");
-        if (antjunit != null)
-            classPathSet.setProperty("derbyTesting.antjunit", antjunit.toExternalForm());
-
-        URL ant = getURL("org.apache.tools.ant.Task");
-        if (ant != null) {
-            classPathSet.setProperty("derbyTesting.ant", ant.toExternalForm());
-        }
+        setCodebase(TESTING_ANTJUNIT, "org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner");
+
+        setCodebase(TESTING_ANT, "org.apache.tools.ant.Task");
 
         // variables for lucene jar files
         URL luceneCore = getURL( "org.apache.lucene.store.FSDirectory" );
         if ( luceneCore != null )
         {
-            classPathSet.setProperty( "derbyTesting.lucene.core", luceneCore.toExternalForm() );
+            setCodebase(LUCENE_CORE, luceneCore);
             classPathSet.setProperty( "derbyTesting.lucene.core.jar.file", luceneCore.getFile() );
         }
 
@@ -391,9 +403,7 @@ public final class SecurityManagerSetup
          * jar file.  We can then grant the JAXP impl the permissions
          * needed for reading the DTD files.
          */
-        String jaxp = XML.getJAXPParserLocation();
-        if (jaxp != null)
-            classPathSet.setProperty("derbyTesting.jaxpjar", jaxp);
+        setCodebase(JAXP, XML.getJAXPParserLocation());
 
 		URL testing = getURL(SecurityManagerSetup.class);
         URL ppTesting = null;
@@ -404,44 +414,70 @@ public final class SecurityManagerSetup
         }
 		boolean isClasspath = testing.toExternalForm().endsWith("/");
 		if (isClasspath) {
-			classPathSet.setProperty("derbyTesting.codeclasses",
-					testing.toExternalForm());
             // ppTesting can be null, for instance if 'classes.pptesting' is
             // not on the classpath.
-            if (ppTesting != null) {
-                classPathSet.setProperty("derbyTesting.ppcodeclasses",
-                    ppTesting.toExternalForm());
-            }
+            setCodebase(PACKAGE_PRIVATE_CLASSES, ppTesting);
             isJars = false;
-			return false;
 		}
-		classPathSet.setProperty("derbyTesting.testjar", stripJar(testing));
+        else
+        {
+            isJars = true;
+        }
+        
+        setCodebase(DERBY_TESTING, testing);
         if (testing.getProtocol().equals("file")) {
            File f = new File(testing.getPath());
-           classPathSet.setProperty("derbyTesting.testjarpath",
-                                               f.getAbsolutePath());
+           classPathSet.setProperty("derbyTesting.testjarpath", f.getAbsolutePath());
         }
-        isJars = true;
-		
-		URL derby = getURL("org.apache.derby.jdbc.BasicEmbeddedDataSource40");
-        if (derby != null)
-		    classPathSet.setProperty("derbyTesting.codejar", stripJar(derby));
-
-		// if we attempt to check on availability of the ClientDataSource with 
-		// JSR169, attempts will be made to load classes not supported in
-		// that environment, such as javax.naming.Referenceable. See DERBY-2269.
-		if (!JDBC.vmSupportsJSR169()) {
-           URL client = getURL(
-                    JDBC.vmSupportsJNDI() ?
-                    "org.apache.derby.jdbc.ClientDataSource" :
-                    "org.apache.derby.jdbc.BasicClientDataSource40");
 
-		    if(client != null)
-		        classPathSet.setProperty("derbyTesting.clientjar", stripJar(client));
-        }
+        setCodebase(DERBY_ENGINE, "org.apache.derby.database.Database");
+        setCodebase(DERBY_CLIENT, "org.apache.derby.client.ClientAutoloadedDriver");
+        setCodebase(DERBY_SHARED, "org.apache.derby.shared.common.error.MessageUtils");
+        setCodebase(DERBY_NETSERVER, "org.apache.derby.drda.NetworkServerControl");
+        setCodebase(DERBY_TOOLS, "org.apache.derby.tools.ij");
+        setCodebase(DERBY_OPTIONAL_TOOLS, "org.apache.derby.optional.utils.ToolUtilities");
+
 		return false;
 	}
-    
+
+    /**
+     * Set the System property which identifies the
+     * location of a codebase referenced by derby_tests.policy.
+     *
+     * @param codebaseProperty Name of codebase variable.
+     * @param className Name of class used to locate the codebase URL.
+     */
+    private static void setCodebase
+      (
+       String codebaseProperty,
+       String className
+       )
+    {
+        if (className != null)
+        {
+            setCodebase(codebaseProperty, getURL(className));
+        }
+    }
+
+    /**
+     * Set the System property which identifies the
+     * location of a codebase referenced by derby_tests.policy.
+     *
+     * @param codebaseProperty Name of codebase variable.
+     * @param codebaseURL URL of codebase
+     */
+    private static void setCodebase
+      (
+       String codebaseProperty,
+       URL codebaseURL
+       )
+    {
+        if (codebaseURL != null)
+        {
+            classPathSet.setProperty(codebaseProperty, codebaseURL.toExternalForm());
+        }
+    }
+  
     /**
      * Return the policy file system properties for use
      * by the old test harness. This ensures a consistent
@@ -454,18 +490,6 @@ public final class SecurityManagerSetup
         return classPathSet;
     }
 	
-	/**
-	 * Strip off the last token which will be the jar name.
-	 * The returned string includes the trailing slash.
-	 * @param url
-	 * @return the jar name from the URL as a String
-	 */
-	private static String stripJar(URL url)
-	{
-		String ef = url.toExternalForm();
-		return ef.substring(0, ef.lastIndexOf('/') + 1);
-	}
-    
     /**
      * Get the URL of the code base from a class name.
      * If the class cannot be loaded, null is returned.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest.policy Sat Mar 10 16:24:00 2018
@@ -42,7 +42,7 @@
 //
 // Permissions for the tests (derbyTesting.jar)
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Allow tests to install and uninstall the security manager and
   // to refresh the policy
   permission java.util.PropertyPermission "java.security.policy", "read,write";
@@ -58,26 +58,6 @@ grant codeBase "${derbyTesting.testjar}d
 };
 
 
-//
-// Permissions for running the test on the class files
-//
-grant codeBase "${derbyTesting.codeclasses}" {
-  // Allow tests to install and uninstall the security manager and
-  // to refresh the policy
-  permission java.util.PropertyPermission "java.security.policy", "read,write";
-  permission java.lang.RuntimePermission "setSecurityManager";
-  permission java.security.SecurityPermission "getPolicy";
-
-  // derbyTesting.junit.TestConfiguration... modifies System properties
-  permission java.util.PropertyPermission "*", "read,write";
-
-//These are the ones that matters:
-//-----------------------------------------------------------------------------
-  permission java.lang.RuntimePermission "getStackTrace";
-  permission java.lang.RuntimePermission "modifyThreadGroup";
-//-----------------------------------------------------------------------------
-};
-
 grant codeBase "${derbyTesting.junit}" {
     // This permission is needed when running the tests using ant 1.7
     permission java.io.FilePermission "${user.dir}${/}*", "write";
@@ -95,8 +75,8 @@ grant codeBase "${derbyTesting.antjunit}
 };
 
 
-grant codeBase "${derbyTesting.codejar}derby.jar" {
-//These are the ones that matters:
+grant codeBase "${derbyTesting.engine}" {
+//These are the ones that matter:
 //-----------------------------------------------------------------------------
   permission java.lang.RuntimePermission "getStackTrace";
   permission java.lang.RuntimePermission "modifyThreadGroup";
@@ -107,8 +87,8 @@ grant codeBase "${derbyTesting.codejar}d
   permission java.lang.RuntimePermission "getProtectionDomain";
 };
 
-grant codeBase "${derbyTesting.codejar}derbyshared.jar" {
-//These are the ones that matters:
+grant codeBase "${derbyTesting.shared}" {
+//These are the ones that matter:
 //-----------------------------------------------------------------------------
   permission java.lang.RuntimePermission "getStackTrace";
   permission java.lang.RuntimePermission "modifyThreadGroup";
@@ -120,8 +100,8 @@ grant codeBase "${derbyTesting.codejar}d
 };
 
 
-grant codeBase "${derbyTesting.codejar}derbyclient.jar" {
-//These are the ones that matters:
+grant codeBase "${derbyTesting.client}" {
+//These are the ones that matter:
 //-----------------------------------------------------------------------------
   permission java.lang.RuntimePermission "getStackTrace";
   permission java.lang.RuntimePermission "modifyThreadGroup";

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest1.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest1.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest1.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/AssertFailureTest1.policy Sat Mar 10 16:24:00 2018
@@ -42,7 +42,7 @@
 //
 // Permissions for the tests (derbyTesting.jar)
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Allow tests to install and uninstall the security manager and
   // to refresh the policy
   permission java.util.PropertyPermission "java.security.policy", "read,write";
@@ -58,21 +58,6 @@ grant codeBase "${derbyTesting.testjar}d
 };
 
 
-//
-// Permissions for running the test on the class files
-//
-grant codeBase "${derbyTesting.codeclasses}" {
-  // Allow tests to install and uninstall the security manager and
-  // to refresh the policy
-  permission java.util.PropertyPermission "java.security.policy", "read,write";
-  permission java.lang.RuntimePermission "setSecurityManager";
-  permission java.security.SecurityPermission "getPolicy";
-
-  // derbyTesting.junit.TestConfiguration... modifies System properties
-  permission java.util.PropertyPermission "*", "read,write";
-
-};
-
 grant codeBase "${derbyTesting.junit}" {
     // This permission is needed when running the tests using ant 1.7
     permission java.io.FilePermission "${user.dir}${/}*", "write";

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest.java?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest.java Sat Mar 10 16:24:00 2018
@@ -230,10 +230,12 @@ public class MissingPermissionsTest exte
         final List<String> args = new ArrayList<String>();
         args.add("-Djava.security.manager");
         args.add("-Djava.security.policy=extin/MissingPermissionsTest2.policy");
-        args.add("-DderbyTesting.codejar="
-                    + getSystemProperty("derbyTesting.codejar"));
-        args.add("-DderbyTesting.testjar="
-                    + getSystemProperty("derbyTesting.testjar"));
+        args.add("-DderbyTesting.engine="
+                    + getSystemProperty("derbyTesting.engine"));
+        args.add("-DderbyTesting.tools="
+                    + getSystemProperty("derbyTesting.tools"));
+        args.add("-DderbyTesting.testing="
+                    + getSystemProperty("derbyTesting.testing"));
         args.add("-DderbyTesting.junit="
                     + getSystemProperty("derbyTesting.junit"));
         String antjunit = getSystemProperty("derbyTesting.antjunit");
@@ -368,10 +370,12 @@ public class MissingPermissionsTest exte
             args.add("-Djava.security.manager");
             args.add(
                 "-Djava.security.policy=extin/MissingPermissionsTest.policy");
-            args.add("-DderbyTesting.codejar="
-                    + getSystemProperty("derbyTesting.codejar"));
-            args.add("-DderbyTesting.testjar="
-                    + getSystemProperty("derbyTesting.testjar"));
+            args.add("-DderbyTesting.engine="
+                    + getSystemProperty("derbyTesting.engine"));
+            args.add("-DderbyTesting.tools="
+                    + getSystemProperty("derbyTesting.tools"));
+            args.add("-DderbyTesting.testing="
+                    + getSystemProperty("derbyTesting.testing"));
             args.add("-DderbyTesting.junit="
                     + getSystemProperty("derbyTesting.junit"));
             String antjunit = getSystemProperty("derbyTesting.antjunit");

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest.policy Sat Mar 10 16:24:00 2018
@@ -15,7 +15,7 @@
 //   limitations under the License.
 //
 
-grant codeBase "${derbyTesting.codejar}derby.jar"
+grant codeBase "${derbyTesting.engine}"
 {
   // These permissions are needed for everyday, embedded Derby usage.
   //
@@ -111,7 +111,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the tests (derbyTesting.jar)
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Allow tests to install and uninstall the security manager and
   // to refresh the policy
   permission java.util.PropertyPermission "java.security.policy", "read,write";
@@ -162,6 +162,6 @@ grant {
   permission java.lang.RuntimePermission "${jacoco.active}shutdownHooks";
 };
 
-grant codeBase "${derbyTesting.codejar}derbytools.jar" {
+grant codeBase "${derbyTesting.tools}" {
   permission org.apache.derby.shared.common.security.SystemPermission "engine", "usederbyinternals";
 };

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest1.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest1.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest1.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest1.policy Sat Mar 10 16:24:00 2018
@@ -15,7 +15,7 @@
 //   limitations under the License.
 //
 
-grant codeBase "${derbyTesting.codejar}derby.jar"
+grant codeBase "${derbyTesting.engine}"
 {
   // These permissions are needed for everyday, embedded Derby usage.
   //
@@ -113,7 +113,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the tests (derbyTesting.jar)
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Allow tests to install and uninstall the security manager and
   // to refresh the policy
   permission java.util.PropertyPermission "java.security.policy", "read,write";
@@ -154,6 +154,6 @@ grant codeBase "${derbyTesting.antjunit}
     permission java.io.FilePermission "${user.dir}${/}*", "write";
 };
 
-grant codeBase "${derbyTesting.codejar}derbytools.jar" {
+grant codeBase "${derbyTesting.tools}" {
   permission org.apache.derby.shared.common.security.SystemPermission "engine", "usederbyinternals";
 };

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest2.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest2.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest2.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest2.policy Sat Mar 10 16:24:00 2018
@@ -15,7 +15,7 @@
 //   limitations under the License.
 //
 
-grant codeBase "${derbyTesting.codejar}derby.jar"
+grant codeBase "${derbyTesting.engine}"
 {
   // These permissions are needed for everyday, embedded Derby usage.
   //
@@ -99,7 +99,7 @@ grant codeBase "${derbyTesting.codejar}d
 //
 // Permissions for the tests (derbyTesting.jar)
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Allow tests to install and uninstall the security manager and
   // to refresh the policy
   permission java.util.PropertyPermission "java.security.policy", "read,write";
@@ -117,7 +117,7 @@ grant codeBase "${derbyTesting.testjar}d
 };
 
 
-grant codeBase "${derbyTesting.codejar}derbytools.jar"
+grant codeBase "${derbyTesting.tools}"
 {
   // Needed by sysinfo. The file permission is needed to check the existence of
   // jars on the classpath. You can limit this permission to just the locations

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest.policy Sat Mar 10 16:24:00 2018
@@ -66,7 +66,7 @@ grant principal org.apache.derby.authent
 //
 // Permissions for the tests (derbyTesting.jar)
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Allow tests to install and uninstall the security manager and
   // to refresh the policy
   permission java.util.PropertyPermission "java.security.policy", "read,write";
@@ -86,7 +86,7 @@ grant codeBase "${derbyTesting.testjar}d
 //
 // Permissions for the embedded engine (derby.jar)
 //
-grant codeBase "${derbyTesting.codejar}derby.jar" {
+grant codeBase "${derbyTesting.engine}" {
   // System Privileges framework needs to run "doAsPrivileged"
   //permission javax.security.auth.AuthPermission "doAsPrivileged";
   permission org.apache.derby.shared.common.security.SystemPermission "engine", "usederbyinternals";
@@ -106,39 +106,6 @@ grant codeBase "${derbyTesting.codejar}d
   permission java.lang.RuntimePermission "getProtectionDomain";
 };
 
-//
-// Permissions for running the test on the class files
-//
-grant codeBase "${derbyTesting.codeclasses}" {
-  // Allow tests to install and uninstall the security manager and
-  // to refresh the policy
-  permission java.util.PropertyPermission "java.security.policy", "read,write";
-  permission java.lang.RuntimePermission "setSecurityManager";
-  permission java.security.SecurityPermission "getPolicy";
-
-  // Allow setIO to change the system err and out streams
-  //permission java.lang.RuntimePermission "setIO"; 
-
-  // derbyTesting.junit.TestConfiguration... modifies System properties
-  permission java.util.PropertyPermission "*", "read,write";
-
-  // System Privileges test needs to run "doAsPrivileged"
-  permission javax.security.auth.AuthPermission "doAsPrivileged";
-
-  // System Privileges framework needs to run "doAsPrivileged"
-  //permission javax.security.auth.AuthPermission "doAsPrivileged";
-
-  // System Privileges framework needs to resolve relative directory names,
-  // which requires a property-read permission
-  permission java.util.PropertyPermission "user.dir", "read";
-
-  // System Privileges framework needs to canonicalize directory names,
-  // which requires file-read permission
-  // Because this unit test involves some relative and absolute sample paths,
-  // we liberally grant read access to all files.
-  permission java.io.FilePermission "<<ALL FILES>>", "read";
-};
-
 // JUnit jar file tries to read junit.properties in the user's
 // home directory and seems to require permission to read the
 // property user.home as well.
@@ -163,6 +130,6 @@ grant codeBase "${derbyTesting.antjunit}
     permission java.io.FilePermission "${user.dir}${/}*", "write";
 };
 
-grant codeBase "${derbyTesting.codejar}derbytools.jar" {
+grant codeBase "${derbyTesting.tools}" {
   permission org.apache.derby.shared.common.security.SystemPermission "engine", "usederbyinternals";
 };

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest1.policy
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest1.policy?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest1.policy (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/SystemPrivilegesPermissionTest1.policy Sat Mar 10 16:24:00 2018
@@ -46,7 +46,7 @@
 //
 // Permissions for the tests (derbyTesting.jar)
 //
-grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testing}" {
   // Allow tests to install and uninstall the security manager and
   // to refresh the policy
   permission java.util.PropertyPermission "java.security.policy", "read,write";
@@ -66,7 +66,7 @@ grant codeBase "${derbyTesting.testjar}d
 //
 // Permissions for the embedded engine (derby.jar)
 //
-grant codeBase "${derbyTesting.codejar}derby.jar" {
+grant codeBase "${derbyTesting.engine}" {
   // System Privileges framework needs to run "doAsPrivileged"
   //permission javax.security.auth.AuthPermission "doAsPrivileged";
   permission org.apache.derby.shared.common.security.SystemPermission "engine", "usederbyinternals";
@@ -86,39 +86,6 @@ grant codeBase "${derbyTesting.codejar}d
   permission java.lang.RuntimePermission "getProtectionDomain";
 };
 
-//
-// Permissions for running the test on the class files
-//
-grant codeBase "${derbyTesting.codeclasses}" {
-  // Allow tests to install and uninstall the security manager and
-  // to refresh the policy
-  permission java.util.PropertyPermission "java.security.policy", "read,write";
-  permission java.lang.RuntimePermission "setSecurityManager";
-  permission java.security.SecurityPermission "getPolicy";
-
-  // Allow setIO to change the system err and out streams
-  //permission java.lang.RuntimePermission "setIO"; 
-
-  // derbyTesting.junit.TestConfiguration... modifies System properties
-  permission java.util.PropertyPermission "*", "read,write";
-
-  // System Privileges test needs to run "doAsPrivileged"
-  permission javax.security.auth.AuthPermission "doAsPrivileged";
-
-  // System Privileges framework needs to run "doAsPrivileged"
-  //permission javax.security.auth.AuthPermission "doAsPrivileged";
-
-  // System Privileges framework needs to resolve relative directory names,
-  // which requires a property-read permission
-  permission java.util.PropertyPermission "user.dir", "read";
-
-  // System Privileges framework needs to canonicalize directory names,
-  // which requires file-read permission
-  // Because this unit test involves some relative and absolute sample paths,
-  // we liberally grant read access to all files.
-  permission java.io.FilePermission "<<ALL FILES>>", "read";
-};
-
 // JUnit jar file tries to read junit.properties in the user's
 // home directory and seems to require permission to read the
 // property user.home as well.
@@ -143,6 +110,6 @@ grant codeBase "${derbyTesting.antjunit}
     permission java.io.FilePermission "${user.dir}${/}*", "write";
 };
 
-grant codeBase "${derbyTesting.codejar}derbytools.jar" {
+grant codeBase "${derbyTesting.tools}" {
   permission org.apache.derby.shared.common.security.SystemPermission "engine", "usederbyinternals";
 };

Modified: db/derby/code/trunk/java/tools/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/build.xml?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/build.xml (original)
+++ db/derby/code/trunk/java/tools/build.xml Sat Mar 10 16:24:00 2018
@@ -44,8 +44,8 @@
   <!-- Compile-time classpath properties files -->
   <property file="${properties.dir}/extrapath.properties"/>
   <property file="${properties.dir}/compilepath.properties"/>
-  <property name="ijConstants.src" value="${generated.src.dir}/${derby.dir}/impl/tools/ij/ijConstants.java"/>
-  <property name="ijTokenManager.src" value="${generated.src.dir}/${derby.dir}/impl/tools/ij/ijTokenManager.java"/>
+  <property name="ijConstants.src" value="${generated.src.tools.dir}/${derby.dir}/impl/tools/ij/ijConstants.java"/>
+  <property name="ijTokenManager.src" value="${generated.src.tools.dir}/${derby.dir}/impl/tools/ij/ijTokenManager.java"/>
 
   <!-- Release and Version info -->
   <property file="${properties.dir}/release.properties"/>
@@ -69,15 +69,27 @@
       optimize="${optimize}"
       proceed="${proceed}"
       verbose="${verbose}"
-      srcdir="${derby.tools.src.dir}:${generated.src.dir}"
-      destdir="${out.dir}">
+      srcdir="${derby.tools.src.dir}:${generated.src.tools.dir}"
+      destdir="${out.tools.dir}">
       <compilerarg value="-Xlint"/>
+      <classpath>
+		    <pathelement location="${out.shared.dir}"/>
+		    <pathelement location="${out.engine.dir}"/>
+		    <pathelement location="${out.client.dir}"/>
+      </classpath>
    </javac>
 
-    <copy todir="${loc.dir}" flatten="true">
+    <copy todir="${loc.tools.dir}" flatten="true">
       <fileset dir="${derby.tools.locales.dir}">
-        <include name="sysinfoMessages*.properties"/>
-        <include name="toolsmessages*.properties"/>
+        <include name="sysinfoMessages.properties"/>
+        <include name="toolsmessages.properties"/>
+      </fileset>
+    </copy>
+
+    <copy todir="${loc.locales.dir}" flatten="true">
+      <fileset dir="${derby.tools.locales.dir}">
+        <include name="sysinfoMessages_*.properties"/>
+        <include name="toolsmessages_*.properties"/>
       </fileset>
     </copy>
 
@@ -86,6 +98,7 @@
   <target name="parser">
     <ant antfile="${src.dir}/build.xml" target="genParser">
       <property name="msg" value="Generating ij parser..."/>
+      <property name="outroot" value="${generated.src.tools.dir}"/>
       <property name="srcroot" value="tools"/>
       <property name="directory" value="${derby.dir}/impl/tools/ij"/>
       <property name="rmfiles" value="ijimplparser_rm.files"/>
@@ -95,6 +108,7 @@
     </ant>
     <ant antfile="${src.dir}/build.xml" target="genParser">
       <property name="msg" value="Generating mtGrammar parser..."/>
+      <property name="outroot" value="${generated.src.tools.dir}"/>
       <property name="srcroot" value="tools"/>
       <property name="directory" value="${derby.dir}/impl/tools/ij"/>
       <property name="rmfiles" value="mtparser_rm.files"/>
@@ -126,7 +140,7 @@
       we delete the conflicting class here.
     -->
     <delete>
-      <fileset dir="${generated.src.dir}/${derby.dir}/impl/tools/ij">
+      <fileset dir="${generated.src.tools.dir}/${derby.dir}/impl/tools/ij">
         <include name="ParseException.java"/>
       </fileset>
     </delete>

Modified: db/derby/code/trunk/tools/ant/properties/dirs.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/ant/properties/dirs.properties?rev=1826417&r1=1826416&r2=1826417&view=diff
==============================================================================
--- db/derby/code/trunk/tools/ant/properties/dirs.properties (original)
+++ db/derby/code/trunk/tools/ant/properties/dirs.properties Sat Mar 10 16:24:00 2018
@@ -34,20 +34,42 @@ class.dir=classes
 out.base=${basedir}
 generated.dir=${out.base}/generated
 generated.src.dir=${generated.dir}/java
+generated.src.engine.dir=${generated.src.dir}/engine
+generated.src.shared.dir=${generated.src.dir}/shared
+generated.src.tools.dir=${generated.src.dir}/tools
 generated.bin.dir=${generated.dir}/bin
 generated.toursdb.dir=${generated.dir}/toursdb
+
 out.dir=${out.base}/${class.dir}
-out.storeless.dir=${out.base}/classes.storeless
 out.pptesting.dir=${out.base}/classes.pptesting
-outcom.dir=${out.dir}/${com.dir}
 out.javadoc.dir=${out.base}/javadoc
 out.testdir=${out.base}/testout_${jdk}
-loc.dir=${out.dir}/org/apache/derby/loc
-drdaloc.dir=${out.dir}/org/apache/derby/loc/drda
+drdaloc.dir=${out.drda.dir}/org/apache/derby/loc/drda
 jarsdist.dir=${out.base}/jars
-metadata.out.dir=${out.dir}/org/apache/derby/impl/jdbc
+metadata.out.dir=${out.engine.dir}/org/apache/derby/impl/jdbc
 
+out.build.dir=${out.dir}/build
+out.client.dir=${out.dir}/client
+out.demo.dir=${out.dir}/demo
+out.drda.dir=${out.dir}/drda
+out.engine.dir=${out.dir}/engine
+out.optional.dir=${out.dir}/optional
+out.run.dir=${out.dir}/run
+out.shared.dir=${out.dir}/shared
+out.storeless.dir=${out.dir}/storeless
 out.stubs.dir=${out.dir}/stubs
+out.testing.dir=${out.dir}/testing
+out.tools.dir=${out.dir}/tools
+out.locales.dir=${out.dir}/locales
+
+out.all.dir=${out.build.dir}:${out.client.dir}:${out.demo.dir}:${out.drda.dir}:${out.engine.dir}:${out.optional.dir}:${out.run.dir}:${out.shared.dir}:${out.storeless.dir}:${out.stubs.dir}:${out.testing.dir}:${out.tools.dir}:${out.locales.dir}
+
+loc.engine.dir=${out.engine.dir}/org/apache/derby/loc
+loc.client.dir=${out.client.dir}/org/apache/derby/loc
+loc.locales.dir=${out.locales.dir}/org/apache/derby/loc
+loc.tools.dir=${out.tools.dir}/org/apache/derby/loc
+
+
 out.felix.dir=${out.stubs.dir}/felix
 
 # An empty directory that we put in the boot classpath to prevent Ant
@@ -91,13 +113,13 @@ derby.tools.locales.dir=${derby.tools.di
 derby.client.locales.dir=${derby.client.dir}/loc
 
 sanity.dir=${derby.shared.dir}/shared/common/sanity
-sanity.out.dir=${out.dir}/${derby.dir}/shared/common/sanity
+sanity.out.dir=${out.shared.dir}/${derby.dir}/shared/common/sanity
 
-generated.sanity.dir=${generated.src.dir}/${derby.dir}/shared/common/sanity
-generated.ij.dir=${generated.src.dir}/${derby.dir}/impl/tools/ij
-generated.sql.dir=${generated.src.dir}/${derby.dir}/impl/sql/compile
-generated.engine.locale.dir=${generated.src.dir}/${derby.dir}/loc
-generated.cache.dir=${generated.src.dir}/${derby.dir}/iapi/services/cache
+generated.sanity.dir=${generated.src.shared.dir}/${derby.dir}/shared/common/sanity
+generated.ij.dir=${generated.src.tools.dir}/${derby.dir}/impl/tools/ij
+generated.sql.dir=${generated.src.engine.dir}/${derby.dir}/impl/sql/compile
+generated.engine.locale.dir=${generated.src.engine.dir}/${derby.dir}/loc
+generated.cache.dir=${generated.src.engine.dir}/${derby.dir}/iapi/services/cache
 
 gen.doc.dir=${out.dir}/doc
 
@@ -109,7 +131,7 @@ lf.dir=${release.dir}/lf
 
 
 derby.testing.dir=org/apache/derbyTesting
-derby.testing.out.dir=${out.dir}/${derby.testing.dir}
+derby.testing.out.dir=${out.testing.dir}/${derby.testing.dir}
 derby.testing.functest.dir=${derby.testing.dir}/functionTests
 derby.testing.unittest.dir=${derby.testing.dir}/unitTests
 derby.testing.junit.dir=${derby.testing.dir}/junit



Mime
View raw message