Return-Path: X-Original-To: apmail-bval-commits-archive@www.apache.org Delivered-To: apmail-bval-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 209B9106E6 for ; Thu, 29 May 2014 17:50:49 +0000 (UTC) Received: (qmail 4877 invoked by uid 500); 29 May 2014 17:50:49 -0000 Delivered-To: apmail-bval-commits-archive@bval.apache.org Received: (qmail 4845 invoked by uid 500); 29 May 2014 17:50:49 -0000 Mailing-List: contact commits-help@bval.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@bval.apache.org Delivered-To: mailing list commits@bval.apache.org Received: (qmail 4838 invoked by uid 99); 29 May 2014 17:50:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 May 2014 17:50:49 +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, 29 May 2014 17:50:48 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 89C20238890B; Thu, 29 May 2014 17:50:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1598345 - in /bval/trunk/bval-jsr303: pom.xml src/test/resources/java.policy Date: Thu, 29 May 2014 17:50:24 -0000 To: commits@bval.apache.org From: mbenson@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140529175024.89C20238890B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mbenson Date: Thu May 29 17:50:24 2014 New Revision: 1598345 URL: http://svn.apache.org/r1598345 Log: get security stuff all working Modified: bval/trunk/bval-jsr303/pom.xml bval/trunk/bval-jsr303/src/test/resources/java.policy Modified: bval/trunk/bval-jsr303/pom.xml URL: http://svn.apache.org/viewvc/bval/trunk/bval-jsr303/pom.xml?rev=1598345&r1=1598344&r2=1598345&view=diff ============================================================================== --- bval/trunk/bval-jsr303/pom.xml (original) +++ bval/trunk/bval-jsr303/pom.xml Thu May 29 17:50:24 2014 @@ -33,6 +33,10 @@ Implementation specific classes for JSR 303 Bean Validation 1.0 + + 1.9.3 + + jaxb @@ -98,6 +102,63 @@ org.apache.maven.plugins + maven-resources-plugin + + + default-testResources + + + testResources + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + filter-testResources + process-test-resources + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.ant + ant + ${ant.version} + + + + + org.apache.maven.plugins maven-surefire-plugin Modified: bval/trunk/bval-jsr303/src/test/resources/java.policy URL: http://svn.apache.org/viewvc/bval/trunk/bval-jsr303/src/test/resources/java.policy?rev=1598345&r1=1598344&r2=1598345&view=diff ============================================================================== --- bval/trunk/bval-jsr303/src/test/resources/java.policy (original) +++ bval/trunk/bval-jsr303/src/test/resources/java.policy Thu May 29 17:50:24 2014 @@ -1,34 +1,27 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one or more -// contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. -// The ASF licenses this file to You under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// -// $Id$ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. // // Allows unit tests to run with a Java Security Manager // -// Cloned from https://svn.apache.org/repos/asf/commons/proper/lang/trunk/src/test/resources/java.policy -// -// -Djava.security.manager -Djava.security.policy=${basedir}/src/test/resources/java.policy -// grant { // let everyone read target dir - permission java.io.FilePermission "${user.dir}/target/-", "read"; + permission java.io.FilePermission "${preserve.project.build.directory}${/}-", "read"; }; // we don't care about the permissions of the testing infrastructure, @@ -56,21 +49,46 @@ grant codeBase "file://${user.home}/.m2/ permission java.security.AllPermission; }; -// and our own testcases -grant codeBase "file://${user.dir}/target/test-classes/-" +// surefire booter; +grant codeBase "file://${project.build.directory}/surefire/-" { permission java.security.AllPermission; }; +// Geronimo specs +grant codeBase "file://${user.home}/.m2/repository/org/apache/geronimo/specs/-" +{ + permission java.lang.RuntimePermission "accessDeclaredMembers"; + permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; + permission java.io.FilePermission "${user.home}/.m2/repository/-", "read"; +}; + +// RI specs +grant codeBase "file://${user.home}/.m2/repository/javax/validation/-" +{ + permission java.lang.RuntimePermission "accessDeclaredMembers"; + permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; + permission java.io.FilePermission "${user.home}/.m2/repository/-", "read"; +}; + grant codeBase "file://${user.home}/.m2/repository/org/apache/bval/-" { permission java.lang.RuntimePermission "accessDeclaredMembers"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; }; -grant codeBase "file://${user.dir}/target/classes/-" +// test classes +grant codeBase "file://${project.build.testOutputDirectory}/-" +{ + permission java.security.AllPermission; +}; + +// classes under test +grant codeBase "file://${project.build.outputDirectory}/-" { + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.xml.internal.bind.*"; permission java.lang.RuntimePermission "accessDeclaredMembers"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; permission java.io.FilePermission "${user.home}/.m2/repository/-", "read"; + permission java.util.PropertyPermission "*", "read"; };