Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B15857413 for ; Tue, 6 Sep 2011 16:17:10 +0000 (UTC) Received: (qmail 72006 invoked by uid 500); 6 Sep 2011 16:17:10 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 71918 invoked by uid 500); 6 Sep 2011 16:17:09 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 71910 invoked by uid 99); 6 Sep 2011 16:17:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 16:17:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of garydgregory@gmail.com designates 209.85.210.171 as permitted sender) Received: from [209.85.210.171] (HELO mail-iy0-f171.google.com) (209.85.210.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 16:17:04 +0000 Received: by iagk10 with SMTP id k10so9718093iag.30 for ; Tue, 06 Sep 2011 09:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=xW1RkLXEtyJEj1GZQqf9rax9ydNDg6rNpInte+yW9bs=; b=pW/41VoN55kYW0E/0u0RWzm80P7XTDvh+zXUT1f+Yb9dU9DDzxTA7mjAr5kDQUINrG ydY1WbO7vqVRBmOt1phstdkqjKJF8KG3SenXuoyPzaDyyQLk7OdMoDbbx7fRnv33r+vT r8ezblFSaK+gKWXVkVdlYYXkfRzEIIfH5u4zg= MIME-Version: 1.0 Received: by 10.231.6.164 with SMTP id 36mr2150836ibz.82.1315325803705; Tue, 06 Sep 2011 09:16:43 -0700 (PDT) Received: by 10.231.33.198 with HTTP; Tue, 6 Sep 2011 09:16:43 -0700 (PDT) In-Reply-To: References: <20110906124639.E9F6123889EB@eris.apache.org> Date: Tue, 6 Sep 2011 12:16:43 -0400 Message-ID: Subject: Re: svn commit: r1165645 - /commons/proper/lang/trunk/src/test/resources/java.policy From: Gary Gregory To: Commons Developers List Content-Type: multipart/alternative; boundary=0015175ce0684b376c04ac4827e4 --0015175ce0684b376c04ac4827e4 Content-Type: text/plain; charset=UTF-8 On Tue, Sep 6, 2011 at 11:14 AM, sebb wrote: > On 6 September 2011 15:44, Gary Gregory wrote: > > On Tue, Sep 6, 2011 at 9:48 AM, sebb wrote: > > > >> On 6 September 2011 13:46, 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. > > Surely this is a JAAS issue? > This is about configuring JAAS, which surefire does for JUnit 3 but not 4 (based on what I read). Gary > > > 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 > > > > --------------------------------------------------------------------- > 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 --0015175ce0684b376c04ac4827e4--