You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2016/01/29 23:04:12 UTC

svn commit: r1727650 - in /webservices/axiom/branches/1.2.x: ./ pom.xml systests/jboss-tests/pom.xml

Author: veithen
Date: Fri Jan 29 22:04:12 2016
New Revision: 1727650

URL: http://svn.apache.org/viewvc?rev=1727650&view=rev
Log:
Merge r1727640 (with minor change) to the 1.2 branch.

Modified:
    webservices/axiom/branches/1.2.x/   (props changed)
    webservices/axiom/branches/1.2.x/pom.xml
    webservices/axiom/branches/1.2.x/systests/jboss-tests/pom.xml

Propchange: webservices/axiom/branches/1.2.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 29 22:04:12 2016
@@ -12,4 +12,4 @@
 /webservices/axiom/branches/attrs-aspects:1685218-1686663
 /webservices/axiom/branches/namespaceURIInterning:1293148-1293587
 /webservices/axiom/branches/osgi-redesign:1180368-1180596
-/webservices/axiom/trunk:1726096,1726101,1726474-1726475,1726489,1727220,1727422,1727435,1727496,1727541,1727549
+/webservices/axiom/trunk:1726096,1726101,1726474-1726475,1726489,1727220,1727422,1727435,1727496,1727541,1727549,1727640

Modified: webservices/axiom/branches/1.2.x/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/1.2.x/pom.xml?rev=1727650&r1=1727649&r2=1727650&view=diff
==============================================================================
--- webservices/axiom/branches/1.2.x/pom.xml (original)
+++ webservices/axiom/branches/1.2.x/pom.xml Fri Jan 29 22:04:12 2016
@@ -265,6 +265,7 @@
         <exam.version>4.7.0</exam.version>
         
         <skipDeploy>false</skipDeploy>
+        <hermeticTests>true</hermeticTests>
     </properties>
 
     <repositories>
@@ -582,13 +583,17 @@
                              the data instead of loading it into memory). Obviously, the execution time of
                              these tests also are proportional to the heap size. To accelerate the execution
                              of the tests, we should use a heap size as small as possible. -->
-                        <argLine>-Xms16m -Xmx48m ${jacoco.surefireArgLine}</argLine>
+                        <argLine>-Xms16m -Xmx48m ${jacoco.surefireArgLine} ${securityManagerArgs}</argLine>
                         <systemProperties>
                             <property>
                                 <name>java.io.tmpdir</name>
                                 <value>${project.build.directory}/tmp</value>
                             </property>
                             <property>
+                                <name>user.home</name>
+                                <value>${project.build.directory}</value>
+                            </property>
+                            <property>
                                 <name>java.awt.headless</name>
                                 <value>true</value>
                             </property>
@@ -617,13 +622,17 @@
                     <artifactId>maven-failsafe-plugin</artifactId>
                     <version>2.19</version>
                     <configuration>
-                        <argLine>${jacoco.failsafeArgLine}</argLine>
+                        <argLine>${jacoco.failsafeArgLine} ${securityManagerArgs}</argLine>
                         <systemProperties>
                             <property>
                                 <name>java.io.tmpdir</name>
                                 <value>${project.build.directory}/tmp</value>
                             </property>
                             <property>
+                                <name>user.home</name>
+                                <value>${project.build.directory}</value>
+                            </property>
+                            <property>
                                 <name>java.awt.headless</name>
                                 <value>true</value>
                             </property>
@@ -903,6 +912,49 @@
                                 ]]></script>
                             </scripts>
                         </configuration>
+                    </execution>
+                    <execution>
+                        <id>generate-policy-file</id>
+                        <phase>generate-test-resources</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <scripts>
+                                <script><![CDATA[
+                                    if (project.packaging != 'pom' && project.properties['hermeticTests'] == 'true') {
+                                        new File(project.build.directory, "test.policy").withWriter { out ->
+                                            out.println "grant {"
+                                            out.println """  permission java.io.FilePermission "${java.home}${file.separator}-", "read";"""
+                                            out.println """  permission java.io.FilePermission "${settings.localRepository}${file.separator}-", "read";"""
+                                            session.sortedProjects.each({
+                                                out.println """  permission java.io.FilePermission "${it.build.directory}${file.separator}*", "read";"""
+                                            })
+                                            out.println """  permission java.io.FilePermission "${basedir}${file.separator}-", "read";"""
+                                            out.println """  permission java.io.FilePermission "${project.build.directory}", "read,write";"""
+                                            out.println """  permission java.io.FilePermission "${project.build.directory}${file.separator}-", "read,write,delete";"""
+                                            out.println """  permission java.lang.RuntimePermission "*";"""
+                                            out.println """  permission java.lang.reflect.ReflectPermission "*";"""
+                                            out.println """  permission java.net.NetPermission "*";"""
+                                            out.println """  permission java.net.SocketPermission "localhost", "connect,listen,accept,resolve";"""
+                                            out.println """  permission java.security.SecurityPermission "*";"""
+                                            out.println """  permission java.util.PropertyPermission "*", "read,write";"""
+                                            out.println """  permission javax.management.MBeanPermission "*", "*";"""
+                                            out.println """  permission javax.management.MBeanServerPermission "*";"""
+                                            out.println """  permission javax.management.MBeanTrustPermission "*";"""
+                                            out.println """  permission javax.xml.bind.JAXBPermission "*";"""
+                                            out.println """  permission javax.xml.ws.WebServicePermission "publishEndpoint";"""
+                                            out.println """  permission org.osgi.framework.AdminPermission "*", "*";"""
+                                            out.println """  permission org.osgi.framework.ServicePermission "*", "register,get";"""
+                                            out.println "};"
+                                        }
+                                        project.properties['securityManagerArgs'] = '-Djava.security.manager -Djava.security.policy=${project.build.directory}/test.policy'
+                                    } else {
+                                        project.properties['securityManagerArgs'] = ''
+                                    }
+                                ]]></script>
+                            </scripts>
+                        </configuration>
                     </execution>
                     <execution>
                         <id>check-jacoco-exec</id>

Modified: webservices/axiom/branches/1.2.x/systests/jboss-tests/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/1.2.x/systests/jboss-tests/pom.xml?rev=1727650&r1=1727649&r2=1727650&view=diff
==============================================================================
--- webservices/axiom/branches/1.2.x/systests/jboss-tests/pom.xml (original)
+++ webservices/axiom/branches/1.2.x/systests/jboss-tests/pom.xml Fri Jan 29 22:04:12 2016
@@ -34,6 +34,7 @@
     <properties>
         <jboss.version>8.2.1.Final</jboss.version>
         <jboss.home>${project.build.directory}/wildfly-${jboss.version}</jboss.home>
+        <hermeticTests>false</hermeticTests>
     </properties>
 
     <dependencies>