commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@scalaris.com>
Subject Re: svn commit: r1165645 - /commons/proper/lang/trunk/src/test/resources/java.policy
Date Tue, 06 Sep 2011 14:17:31 GMT

We use in XStream a dynamic approach:
http://svn.codehaus.org/xstream/trunk/xstream/src/test/com/thoughtworks/xstream/testutil/DynamicSecurityManager.java
http://svn.codehaus.org/xstream/trunk/xstream/src/test/com/thoughtworks/acceptance/SecurityManagerTest.java

sebb wrote:

> On 6 September 2011 13:46,  <ggregory@apache.org> wrote:
>> Author: ggregory
>> Date: Tue Sep  6 12:46:39 2011
>> New Revision: 1165645
>>
>> URL: http://svn.apache.org/viewvc?rev=1165645&view=rev
>> Log:
>> Changes for [parent] 22-SNAPSHOT.
>>
>> Modified:
>> commons/proper/lang/trunk/src/test/resources/java.policy
>>
>> Modified: commons/proper/lang/trunk/src/test/resources/java.policy
>> URL:
>> 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/resources/java.policy?rev=1165645&r1=1165644&r2=1165645&view=diff
>> 
==============================================================================
>> --- commons/proper/lang/trunk/src/test/resources/java.policy (original)
>> +++ commons/proper/lang/trunk/src/test/resources/java.policy Tue Sep  6
>> 12:46:39 2011 @@ -194,6 +194,7 @@ grant { //            at
>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>
>> permission java.io.FilePermission
>> "${user.home}/.m2/repository/org/apache/maven/surefire/surefire-
junit4/2.8.1/surefire-junit4-2.8.1.jar",
>> "read"; +  permission java.io.FilePermission
>> "${user.home}/.m2/repository/org/apache/maven/surefire/surefire-
junit4/2.9/surefire-junit4-2.9.jar",
>> "read";
> 
> That won't work for me - I use a customised repo directory. Also it's
> a pain to keep changing the jar versions.
> Probably won't work for some IDEs either, and may not work on CIs such
> as Gump and Continuum.
> 
> Is there any way to give the test classes normal permissions, and just
> restrict the classes under test?
> 
>>
>> //    java.security.AccessControlException: access denied
>> (java.io.FilePermission
>> C:\Users\ggregory\.m2\repository\org\apache\maven\surefire\surefire-
api\2.8.1\surefire-api-2.8.1.jar
>> read) @@ -212,6 +213,7 @@ grant { //at
>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
>>
>> permission java.io.FilePermission
>> "${user.home}/.m2/repository/org/apache/maven/surefire/surefire-
api/2.8.1/surefire-api-2.8.1.jar",
>> "read"; +  permission java.io.FilePermission
>> "${user.home}/.m2/repository/org/apache/maven/surefire/surefire-
api/2.9/surefire-api-2.9.jar",
>> "read";
>>
>>
>> //    java.security.AccessControlException: access denied
>> (java.lang.RuntimePermission createClassLoader)
>>
>>
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message