Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1E47910796 for ; Thu, 13 Feb 2014 20:26:42 +0000 (UTC) Received: (qmail 2584 invoked by uid 500); 13 Feb 2014 20:26:38 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 2458 invoked by uid 500); 13 Feb 2014 20:26:38 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 2444 invoked by uid 99); 13 Feb 2014 20:26:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Feb 2014 20:26:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Feb 2014 20:26:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E5D0123889D5; Thu, 13 Feb 2014 20:26:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1568033 - in /commons/proper/weaver/trunk: ant/test/pom.xml example/pom.xml example/src/test/resources/java.policy Date: Thu, 13 Feb 2014 20:26:12 -0000 To: commits@commons.apache.org From: mbenson@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140213202612.E5D0123889D5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mbenson Date: Thu Feb 13 20:26:12 2014 New Revision: 1568033 URL: http://svn.apache.org/r1568033 Log: filter java policy file to handle cross platform tomfoolery; ensure antlib test build is right Modified: commons/proper/weaver/trunk/ant/test/pom.xml commons/proper/weaver/trunk/example/pom.xml commons/proper/weaver/trunk/example/src/test/resources/java.policy Modified: commons/proper/weaver/trunk/ant/test/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/ant/test/pom.xml?rev=1568033&r1=1568032&r2=1568033&view=diff ============================================================================== --- commons/proper/weaver/trunk/ant/test/pom.xml (original) +++ commons/proper/weaver/trunk/ant/test/pom.xml Thu Feb 13 20:26:12 2014 @@ -36,11 +36,6 @@ under the License. org.apache.commons - commons-weaver-example - ${project.version} - - - org.apache.commons commons-weaver-privilizer ${project.version} provided @@ -58,23 +53,11 @@ under the License. - sec - - - - org.apache.maven.plugins - maven-surefire-plugin - - -Djava.security.manager -Djava.security.policy=${project.build.directory}/example-test-resources/java.policy - - - - - - antlib-test - true + + !antlib-test-skip + @@ -86,14 +69,19 @@ under the License. unpack-example-sources generate-sources - unpack-dependencies + unpack - sources - org.apache.commons - commons-weaver-example - **/*.java - ${project.build.directory}/example-sources + + + org.apache.commons + commons-weaver-example + ${project.version} + sources + **/*.java + ${project.build.directory}/example-sources + + @@ -104,34 +92,45 @@ under the License. ${project.build.directory}/compile-classpath + commons-weaver-antlib,commons-weaver-privilizer,commons-weaver-privilizer-api,commons-io,asm,asm-commons,asm-tree,asm-util unpack-example-test-sources generate-test-sources - unpack-dependencies + unpack - test-sources - org.apache.commons - commons-weaver-example - **/*.java - ${project.build.directory}/example-test-sources + + + org.apache.commons + commons-weaver-example + ${project.version} + test-sources + **/*.java + ${project.build.directory}/example-test-sources + + unpack-example-test-resources generate-test-resources - unpack-dependencies + unpack - test-sources - org.apache.commons - commons-weaver-example - java.policy - ${project.build.directory}/example-test-resources + + + org.apache.commons + commons-weaver-example + ${project.version} + test-sources + java.policy + ${project.build.directory}/example-test-resources + + @@ -156,11 +155,9 @@ under the License. - - - - PRIVATE + ${privilizer.policy} + PACKAGE @@ -169,6 +166,18 @@ under the License. + + + org.apache.commons + commons-weaver-privilizer + ${project.version} + + + org.apache.ant + ant + ${ant.version} + + org.codehaus.mojo @@ -198,21 +207,60 @@ under the License. + + + + + + + sec + + + + org.apache.maven.plugins + maven-antrun-plugin + - add-test-resources - generate-test-resources + filter-testResources + process-test-resources - add-test-resource + run - - - ${project.build.directory}/example-test-resources - - + + + + + + + + + + + + + + + + + + + + org.apache.ant + ant + ${ant.version} + + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Djava.security.manager -Djava.security.policy=${project.build.testOutputDirectory}/java.policy + Modified: commons/proper/weaver/trunk/example/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/example/pom.xml?rev=1568033&r1=1568032&r2=1568033&view=diff ============================================================================== --- commons/proper/weaver/trunk/example/pom.xml (original) +++ commons/proper/weaver/trunk/example/pom.xml Thu Feb 13 20:26:12 2014 @@ -109,6 +109,19 @@ under the License. true + + org.apache.maven.plugins + maven-resources-plugin + + + default-testResources + + + testResources + + + + @@ -128,9 +141,53 @@ under the License. org.apache.maven.plugins + maven-antrun-plugin + + + filter-testResources + process-test-resources + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.ant + ant + 1.8.4 + + + + + org.apache.maven.plugins maven-surefire-plugin - -Djava.security.manager -Djava.security.policy=${basedir}/src/test/resources/java.policy + -Djava.security.manager -Djava.security.policy=${project.build.testOutputDirectory}/java.policy Modified: commons/proper/weaver/trunk/example/src/test/resources/java.policy URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/example/src/test/resources/java.policy?rev=1568033&r1=1568032&r2=1568033&view=diff ============================================================================== --- commons/proper/weaver/trunk/example/src/test/resources/java.policy (original) +++ commons/proper/weaver/trunk/example/src/test/resources/java.policy Thu Feb 13 20:26:12 2014 @@ -21,8 +21,7 @@ grant { // let everyone read target dir - permission java.io.FilePermission "${user.dir}${/}target${/}-", "read"; - permission java.security.AllPermission; + permission java.io.FilePermission "${preserve.project.build.directory}${/}-", "read"; }; // we don't care about the permissions of the testing infrastructure, @@ -38,7 +37,14 @@ grant codeBase "file://${user.home}/.m2/ permission java.security.AllPermission; }; -grant codeBase "file://${user.dir}/target/classes/-" +// surefire booter; +grant codeBase "file://${project.build.directory}/surefire/-" +{ + permission java.security.AllPermission; +}; + +// classes under test +grant codeBase "file://${project.build.outputDirectory}/-" { permission java.util.PropertyPermission "foo", "read,write"; permission java.util.PropertyPermission "bar", "read,write";