commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1719260 - in /commons/proper/weaver/trunk: ./ ant/ example/src/ modules/ modules/normalizer/ modules/normalizer/example/ modules/normalizer/weaver/ modules/normalizer/weaver/src/it/ modules/normalizer/weaver/src/it/sample/ modules/normaliz...
Date Fri, 11 Dec 2015 05:36:54 GMT
Author: mbenson
Date: Fri Dec 11 05:36:53 2015
New Revision: 1719260

URL: http://svn.apache.org/viewvc?rev=1719260&view=rev
Log:
examples as proper integration tests

Added:
    commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/
    commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/
      - copied from r1718659, commons/proper/weaver/trunk/modules/normalizer/example/
    commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/build.xml   (with
props)
    commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/src/main/java/org/apache/commons/weaver/normalizer/example/Assertions.java
      - copied, changed from r1718659, commons/proper/weaver/trunk/modules/normalizer/example/src/test/java/org/apache/commons/weaver/normalizer/example/NormalizerTest.java
    commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/
    commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/
    commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/invoker.properties
  (with props)
    commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/pom.xml   (with props)
    commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/src/
      - copied from r1718659, commons/proper/weaver/trunk/example/src/
    commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/settings.xml   (with props)
Removed:
    commons/proper/weaver/trunk/example/src/
    commons/proper/weaver/trunk/modules/normalizer/example/
    commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/pom.xml
    commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/src/test/java/org/apache/commons/weaver/normalizer/example/NormalizerTest.java
Modified:
    commons/proper/weaver/trunk/ant/pom.xml
    commons/proper/weaver/trunk/modules/normalizer/pom.xml
    commons/proper/weaver/trunk/modules/normalizer/weaver/pom.xml
    commons/proper/weaver/trunk/modules/pom.xml
    commons/proper/weaver/trunk/modules/privilizer/weaver/pom.xml
    commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/src/test/resources/java.policy
    commons/proper/weaver/trunk/pom.xml

Modified: commons/proper/weaver/trunk/ant/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/ant/pom.xml?rev=1719260&r1=1719259&r2=1719260&view=diff
==============================================================================
--- commons/proper/weaver/trunk/ant/pom.xml (original)
+++ commons/proper/weaver/trunk/ant/pom.xml Fri Dec 11 05:36:53 2015
@@ -37,6 +37,5 @@ under the License.
 
   <modules>
     <module>lib</module>
-    <module>test</module>
   </modules>
 </project>

Modified: commons/proper/weaver/trunk/modules/normalizer/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/normalizer/pom.xml?rev=1719260&r1=1719259&r2=1719260&view=diff
==============================================================================
--- commons/proper/weaver/trunk/modules/normalizer/pom.xml (original)
+++ commons/proper/weaver/trunk/modules/normalizer/pom.xml Fri Dec 11 05:36:53 2015
@@ -45,7 +45,6 @@ under the License.
 
   <modules>
     <module>weaver</module>
-    <module>example</module>
   </modules>
 </project>
 

Modified: commons/proper/weaver/trunk/modules/normalizer/weaver/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/normalizer/weaver/pom.xml?rev=1719260&r1=1719259&r2=1719260&view=diff
==============================================================================
--- commons/proper/weaver/trunk/modules/normalizer/weaver/pom.xml (original)
+++ commons/proper/weaver/trunk/modules/normalizer/weaver/pom.xml Fri Dec 11 05:36:53 2015
@@ -89,14 +89,14 @@ under the License.
   </profiles>
   <build>
     <plugins>
-      <!-- shade plugin creates but does not clean ${basedir}/dependency-reduced-pom.xml
-->
+      <!-- shade plugin creates but does not clean ${project.basedir}/dependency-reduced-pom.xml
-->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-clean-plugin</artifactId>
         <configuration>
           <filesets>
             <fileset>
-              <directory>${basedir}</directory>
+              <directory>${project.basedir}</directory>
               <includes>
                 <include>dependency-reduced-pom.xml</include>
               </includes>
@@ -161,6 +161,116 @@ under the License.
             </configuration>
           </execution>
         </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>prepare-it</id>
+            <phase>pre-integration-test</phase>
+            <configuration>
+              <target>
+                <sync todir="${project.build.directory}/it/sample">
+                  <fileset dir="${project.basedir}/src/it/sample" />
+                </sync>
+              </target>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>antunit</id>
+            <phase>integration-test</phase>
+            <configuration>
+              <target>
+                <ant antfile="${project.build.directory}/it/sample/build.xml"
+                     usenativebasedir="true">
+                  <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"
/>
+                  <property name="ant.build.javac.source" value="${maven.compiler.source}"
/>
+                  <property name="ant.build.javac.target" value="${maven.compiler.target}"
/>
+                </ant>
+              </target>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant</artifactId>
+            <version>${ant.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant-launcher</artifactId>
+            <version>${ant.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant-junit</artifactId>
+            <version>${ant.version}</version>
+          </dependency>
+          <!--dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.11</version>
+          </dependency-->
+          <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>${project.artifactId}</artifactId>
+            <version>${project.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>commons-weaver-antlib</artifactId>
+            <version>${project.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant-antunit</artifactId>
+            <version>1.3</version>
+          </dependency>
+          <dependency>
+            <groupId>org.eclipse.jdt.core.compiler</groupId>
+            <artifactId>ecj</artifactId>
+            <version>4.4.2</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.10</version>
+        <executions>
+          <execution>
+            <id>it-compile-deps</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>copy-dependencies</goal>
+            </goals>
+            <configuration>
+              <includeArtifactIds>commons-lang3,junit,hamcrest-core</includeArtifactIds>
+
+              <outputDirectory>${project.build.directory}/it/sample/lib</outputDirectory>
+              <!--artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.commons</groupId>
+                  <artifactId>commons-lang3</artifactId>
+                  <version>3.4</version>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>junit</groupId>
+                  <artifactId>junit</artifactId>
+                  <version>4.11</version>
+                </artifactItem>
+              </artifactItems-->
+            </configuration>
+          </execution>
+        </executions>
       </plugin>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>

Added: commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/build.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/build.xml?rev=1719260&view=auto
==============================================================================
--- commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/build.xml (added)
+++ commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/build.xml Fri Dec
11 05:36:53 2015
@@ -0,0 +1,50 @@
+<project name="commons-weaver-normalizer-sample-it-with-cw-antlib"
+         default="it" xmlns:au="antlib:org.apache.ant.antunit" 
+         xmlns:cw="antlib:org.apache.commons.weaver.ant">
+
+  <property name="src.dir" location="${basedir}/src/main/java" />
+  <property name="target.dir" location="${basedir}/target" />
+  <property name="classes.dir" location="${target.dir}/classes" />
+  <property name="lib.dir" location="${basedir}/lib" />
+
+  <path id="compile.classpath">
+    <fileset dir="${lib.dir}" />
+  </path>
+
+  <target name="compile">
+    <mkdir dir="${classes.dir}" />
+    <javac srcdir="${src.dir}" destdir="${classes.dir}"
+           classpathref="compile.classpath" includeantruntime="false" />
+  </target>
+
+  <target name="weave" depends="compile">
+    <cw:weave>
+      <cw:settings target="${classes.dir}" classpathref="compile.classpath">
+        <properties>
+          <normalizer.superTypes>
+            org.apache.commons.lang3.reflect.TypeLiteral,
+            org.apache.commons.weaver.normalizer.example.ContrivedWrapper
+          </normalizer.superTypes>
+          <normalizer.targetPackage>org.apache.commons.weaver.normalizer.example.normalized</normalizer.targetPackage>
+        </properties>
+      </cw:settings>
+    </cw:weave>
+  </target>
+
+  <target name="assertions" depends="weave">
+    <java classname="org.apache.commons.weaver.normalizer.example.Assertions"
+          failonerror="true">
+      <classpath>
+        <path refid="compile.classpath" />
+        <pathelement location="${classes.dir}" />
+      </classpath>
+    </java>
+  </target>
+
+  <target name="clean">
+    <delete dir="${target.dir}" />
+  </target>
+
+  <target name="it" depends="clean,assertions" />
+
+</project>

Propchange: commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/build.xml
------------------------------------------------------------------------------
    svn:executable = *

Copied: commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/src/main/java/org/apache/commons/weaver/normalizer/example/Assertions.java
(from r1718659, commons/proper/weaver/trunk/modules/normalizer/example/src/test/java/org/apache/commons/weaver/normalizer/example/NormalizerTest.java)
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/src/main/java/org/apache/commons/weaver/normalizer/example/Assertions.java?p2=commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/src/main/java/org/apache/commons/weaver/normalizer/example/Assertions.java&p1=commons/proper/weaver/trunk/modules/normalizer/example/src/test/java/org/apache/commons/weaver/normalizer/example/NormalizerTest.java&r1=1718659&r2=1719260&rev=1719260&view=diff
==============================================================================
--- commons/proper/weaver/trunk/modules/normalizer/example/src/test/java/org/apache/commons/weaver/normalizer/example/NormalizerTest.java
(original)
+++ commons/proper/weaver/trunk/modules/normalizer/weaver/src/it/sample/src/main/java/org/apache/commons/weaver/normalizer/example/Assertions.java
Fri Dec 11 05:36:53 2015
@@ -18,22 +18,15 @@
  */
 package org.apache.commons.weaver.normalizer.example;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import org.apache.commons.lang3.Validate;
 
-import org.junit.Before;
-import org.junit.Test;
-
-public class NormalizerTest {
-    private InstanceMembers instanceMembers;
-
-    @Before
-    public void setup() {
-        instanceMembers = new InstanceMembers();
-    }
+/**
+ * Like a JUnit test, but invoking JUnit via Ant via Maven is too cumbersome
+ */
+public class Assertions {
+    private InstanceMembers instanceMembers = new InstanceMembers();
 
-    @Test
-    public void testGenericType() {
+    private void testGenericType() {
         final Class<?> stringLiteral = StaticMembers.STRING_TYPE.getClass();
         assertTrue(stringLiteral.isInstance(StaticMembers.STRING_TYPE2));
         assertFalse(stringLiteral.isInstance(StaticMembers.INTEGER_ITERABLE_TYPE));
@@ -45,8 +38,7 @@ public class NormalizerTest {
         assertTrue(integerIterable.isInstance(instanceMembers.integerIterableType));
     }
 
-    @Test
-    public void testAlternateConstructors() {
+    private void testAlternateConstructors() {
         final Class<?> objectWrapper = StaticMembers.WRAPPED_OBJECT.getClass();
         assertTrue(objectWrapper.isInstance(StaticMembers.WRAPPED_STRING));
         assertTrue(objectWrapper.isInstance(StaticMembers.WRAPPED_STRING2));
@@ -60,4 +52,18 @@ public class NormalizerTest {
         final Class<?> intWrapper = StaticMembers.WRAPPED_INT.getClass();
         assertTrue(intWrapper.isInstance(instanceMembers.wrappedInt));
     }
+
+    private void assertTrue(boolean b) {
+        Validate.isTrue(b);
+    }
+
+    private void assertFalse(boolean b) {
+        Validate.isTrue(!b);
+    }
+
+    public static void main(String[] args) {
+        final Assertions assertions = new Assertions();
+        assertions.testGenericType();
+        assertions.testAlternateConstructors();
+    }
 }

Modified: commons/proper/weaver/trunk/modules/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/pom.xml?rev=1719260&r1=1719259&r2=1719260&view=diff
==============================================================================
--- commons/proper/weaver/trunk/modules/pom.xml (original)
+++ commons/proper/weaver/trunk/modules/pom.xml Fri Dec 11 05:36:53 2015
@@ -30,10 +30,6 @@ under the License.
 
   <name>Apache Commons Weaver Modules aggregator project</name>
   <description>Hosts weaver modules.</description>
-  <modules>
-    <module>privilizer</module>
-    <module>normalizer</module>
-  </modules>
 
   <scm>
     <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/weaver/trunk/modules</connection>
@@ -41,13 +37,8 @@ under the License.
     <url>http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules</url>
   </scm>
 
-  <dependencies>
-    <dependency>
-          <!-- we need this dependency for the reactor to correctly resolve the build
order -->
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-weaver-maven-plugin</artifactId>
-      <version>${project.version}</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+  <modules>
+    <module>privilizer</module>
+    <module>normalizer</module>
+  </modules>
 </project>

Modified: commons/proper/weaver/trunk/modules/privilizer/weaver/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/privilizer/weaver/pom.xml?rev=1719260&r1=1719259&r2=1719260&view=diff
==============================================================================
--- commons/proper/weaver/trunk/modules/privilizer/weaver/pom.xml (original)
+++ commons/proper/weaver/trunk/modules/privilizer/weaver/pom.xml Fri Dec 11 05:36:53 2015
@@ -100,6 +100,27 @@ under the License.
   <build>
     <plugins>
       <plugin>
+        <artifactId>maven-invoker-plugin</artifactId>
+        <version>2.0.0</version>
+        <configuration>
+          <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+          <settingsFile>src/it/settings.xml</settingsFile>
+          <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+          <properties>
+            <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+          </properties>
+        </configuration>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <goals>
+              <goal>install</goal>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-source-plugin</artifactId>
         <executions>

Added: commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/invoker.properties
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/invoker.properties?rev=1719260&view=auto
==============================================================================
--- commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/invoker.properties
(added)
+++ commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/invoker.properties
Fri Dec 11 05:36:53 2015
@@ -0,0 +1,20 @@
+// 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.
+//
+
+invoker.goals=clean install
+invoker.profiles.2=sec

Propchange: commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/invoker.properties
------------------------------------------------------------------------------
    svn:executable = *

Added: commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/pom.xml?rev=1719260&view=auto
==============================================================================
--- commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/pom.xml (added)
+++ commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/pom.xml Fri Dec 11
05:36:53 2015
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<!--
+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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.commons.weaver.it</groupId>
+  <artifactId>privilizer-sample</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <description>A simple IT verifying the basic use case.</description>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <privilizer.policy>ON_INIT</privilizer.policy>
+    <privilizer.verify>true</privilizer.verify>
+    <ant.version>1.9.3</ant.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>@project.groupId@</groupId>
+      <artifactId>commons-lang3</artifactId>
+      <version>3.4</version>
+    </dependency>
+    <dependency>
+      <groupId>@project.groupId@</groupId>
+      <artifactId>commons-weaver-privilizer-api</artifactId>
+      <version>@project.version@</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.12</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>@project.groupId@</groupId>
+        <artifactId>commons-weaver-maven-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <weaverConfig>
+            <privilizer.accessLevel>PACKAGE</privilizer.accessLevel>
+            <privilizer.policy>${privilizer.policy}</privilizer.policy>
+            <privilizer.verify>${privilizer.verify}</privilizer.verify>
+          </weaverConfig>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>prepare</goal>
+              <goal>weave</goal>
+            </goals>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>@project.groupId@</groupId>
+            <artifactId>@project.artifactId@</artifactId>
+            <version>@project.version@</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.19</version>
+        <configuration>
+          <redirectTestOutputToFile>true</redirectTestOutputToFile>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <profiles>
+    <profile>
+      <id>sec</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-resources-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>default-testResources</id>
+                <phase />
+                <goals>
+                  <goal>testResources</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.8</version>
+            <executions>
+              <execution>
+                <id>filter-testResources</id>
+                <phase>process-test-resources</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <target>
+                    <echo>filtering test resources</echo>
+                    <mkdir dir="${project.build.testOutputDirectory}" />
+                    <condition property="slash" value="/" else="">
+                      <os family="windows" />
+                    </condition>
+                    <copy todir="${project.build.testOutputDirectory}" verbose="true"
overwrite="true">
+                      <fileset dir="${project.basedir}/src/test/resources" erroronmissingdir="false"
/>
+                      <filterchain>
+                        <expandproperties />
+                        <!-- append extra slash on windows only -->
+                        <replacestring from="file://" to="file://${slash}" />
+                        <replacestring from="${file.separator}" to="/" />
+                        <!-- preserve system-specific file separator -->
+                        <expandproperties>
+                          <propertyset>
+                            <propertyref prefix="project." />
+                            <globmapper from="*" to="preserve.*" />
+                          </propertyset>
+                        </expandproperties>
+                        <expandproperties>
+                          <propertyset>
+                            <propertyref name="localRepositoryPath" />
+                            <mergemapper to="local-repo" />
+                          </propertyset>
+                        </expandproperties>
+                      </filterchain>
+                    </copy>
+                  </target>
+                </configuration>
+              </execution>
+            </executions>
+            <dependencies>
+              <dependency>
+                <groupId>org.apache.ant</groupId>
+                <artifactId>ant</artifactId>
+                <version>${ant.version}</version>
+              </dependency>
+            </dependencies>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <argLine>-Djava.security.manager -Djava.security.policy=${project.build.testOutputDirectory}/java.policy</argLine>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>

Propchange: commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Modified: commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/src/test/resources/java.policy
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/src/test/resources/java.policy?rev=1719260&r1=1718659&r2=1719260&view=diff
==============================================================================
--- commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/src/test/resources/java.policy
(original)
+++ commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/sample/src/test/resources/java.policy
Fri Dec 11 05:36:53 2015
@@ -26,13 +26,13 @@ grant
 
 // we don't care about the permissions of the testing infrastructure,
 // including maven;
-grant codeBase "file://${user.home}/.m2/repository/org/apache/maven/-"
+grant codeBase "file://${local-repo}/org/apache/maven/-"
 {
   permission java.security.AllPermission;
 };
 
 // junit;
-grant codeBase "file://${user.home}/.m2/repository/junit/-"
+grant codeBase "file://${local-repo}/junit/-"
 {
   permission java.security.AllPermission;
 };

Added: commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/settings.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/settings.xml?rev=1719260&view=auto
==============================================================================
--- commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/settings.xml (added)
+++ commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/settings.xml Fri Dec 11 05:36:53
2015
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<settings>
+  <profiles>
+    <profile>
+      <id>it-repo</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>local.central</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>local.central</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+</settings>

Propchange: commons/proper/weaver/trunk/modules/privilizer/weaver/src/it/settings.xml
------------------------------------------------------------------------------
    svn:executable = *

Modified: commons/proper/weaver/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/pom.xml?rev=1719260&r1=1719259&r2=1719260&view=diff
==============================================================================
--- commons/proper/weaver/trunk/pom.xml (original)
+++ commons/proper/weaver/trunk/pom.xml Fri Dec 11 05:36:53 2015
@@ -664,10 +664,9 @@ under the License.
   <modules>
     <module>build-tools</module>
     <module>processor</module>
-    <module>modules</module>
     <module>maven-plugin</module>
-    <module>example</module>
     <module>ant</module>
+    <module>modules</module>
     <module>dist</module>
   </modules>
 



Mime
View raw message