commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: svn commit: r1165645 - /commons/proper/lang/trunk/src/test/resources/java.policy
Date Tue, 06 Sep 2011 14:44:09 GMT
On Tue, Sep 6, 2011 at 9:48 AM, sebb <sebbaz@gmail.com> 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?
>

Yes, only if you use Surefire with JUnit 3. JUnit 4 is not supported IIRC.

Gary


>
> >
> >  //    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
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: http://s.apache.org/rl
Spring Batch in Action: http://s.apache.org/HOq
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message