aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1605352 - in /aries/trunk/application/application-resolve-transform-cm-itests: pom.xml src/test/java/org/apache/aries/application/resolve/transform/cm/itest/ConfigurationPostResolverTest.java
Date Wed, 25 Jun 2014 11:29:41 GMT
Author: cschneider
Date: Wed Jun 25 11:29:41 2014
New Revision: 1605352

URL: http://svn.apache.org/r1605352
Log:
Fixing test failure in ConfigurationPostResolverTest

Modified:
    aries/trunk/application/application-resolve-transform-cm-itests/pom.xml
    aries/trunk/application/application-resolve-transform-cm-itests/src/test/java/org/apache/aries/application/resolve/transform/cm/itest/ConfigurationPostResolverTest.java

Modified: aries/trunk/application/application-resolve-transform-cm-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-resolve-transform-cm-itests/pom.xml?rev=1605352&r1=1605351&r2=1605352&view=diff
==============================================================================
--- aries/trunk/application/application-resolve-transform-cm-itests/pom.xml (original)
+++ aries/trunk/application/application-resolve-transform-cm-itests/pom.xml Wed Jun 25 11:29:41
2014
@@ -182,19 +182,34 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <forkMode>pertest</forkMode>
-                    <excludes>
-                        <exclude>**/*$*</exclude>
-                        <exclude>**/Abstract*.java</exclude>
-                    </excludes>
-                    <includes>
-                        <include>**/Test*.java</include>
-                        <include>**/*Test.java</include>
-                    </includes>
-                </configuration>
             </plugin>
         </plugins>
     </build>
+    
+    <profiles>
+        <profile>
+            <id>ci-build-profile</id>
+            <activation>
+                <property>
+                    <name>maven.repo.local</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <!--
+                                when the local repo location has been specified, we need
to pass
+                                on this information to PAX mvn url
+                            -->
+                            <argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${maven.repo.local}</argLine>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 
 </project>

Modified: aries/trunk/application/application-resolve-transform-cm-itests/src/test/java/org/apache/aries/application/resolve/transform/cm/itest/ConfigurationPostResolverTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/application/application-resolve-transform-cm-itests/src/test/java/org/apache/aries/application/resolve/transform/cm/itest/ConfigurationPostResolverTest.java?rev=1605352&r1=1605351&r2=1605352&view=diff
==============================================================================
--- aries/trunk/application/application-resolve-transform-cm-itests/src/test/java/org/apache/aries/application/resolve/transform/cm/itest/ConfigurationPostResolverTest.java
(original)
+++ aries/trunk/application/application-resolve-transform-cm-itests/src/test/java/org/apache/aries/application/resolve/transform/cm/itest/ConfigurationPostResolverTest.java
Wed Jun 25 11:29:41 2014
@@ -18,7 +18,13 @@
  */
 package org.apache.aries.application.resolve.transform.cm.itest;
 
-import static org.ops4j.pax.exam.CoreOptions.*;
+import static org.ops4j.pax.exam.CoreOptions.composite;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.ops4j.pax.exam.CoreOptions.vmOption;
+import static org.ops4j.pax.exam.CoreOptions.when;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -117,6 +123,20 @@ public class ConfigurationPostResolverTe
         resources.add(mmr2);
         return resources;
     }
+    
+    public Option baseOptions() {
+        String localRepo = System.getProperty("maven.repo.local");
+        if (localRepo == null) {
+            localRepo = System.getProperty("org.ops4j.pax.url.mvn.localRepository");
+        }
+        return composite(
+                junitBundles(),
+                systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
+                when(localRepo != null).useOptions(vmOption("-Dorg.ops4j.pax.url.mvn.localRepository="
+ localRepo)),
+                mavenBundle("org.ops4j.pax.logging", "pax-logging-api").versionAsInProject(),
+                mavenBundle("org.ops4j.pax.logging", "pax-logging-service").versionAsInProject()
+         );
+    }
 
     /**
      * Create the configuration for the PAX container
@@ -125,15 +145,10 @@ public class ConfigurationPostResolverTe
      * @throws Exception
      */
     @Configuration
-    public static Option[] configuration() throws Exception {
+    public Option[] configuration() throws Exception {
         return options(
-                mavenBundle("org.osgi", "org.osgi.core").versionAsInProject(),
+        		baseOptions(),
                 mavenBundle("org.osgi", "org.osgi.compendium").versionAsInProject(),
-                mavenBundle("org.ops4j.pax.logging", "pax-logging-api").versionAsInProject(),
-                mavenBundle("org.ops4j.pax.logging", "pax-logging-service").versionAsInProject(),
-
-                systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-                junitBundles(),
                 mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit").versionAsInProject(),
                 mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint").versionAsInProject(),
                 mavenBundle("org.ow2.asm", "asm-all").versionAsInProject(),



Mime
View raw message