You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2016/07/27 12:12:55 UTC
svn commit: r1754256 -
/sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java
Author: olli
Date: Wed Jul 27 12:12:55 2016
New Revision: 1754256
URL: http://svn.apache.org/viewvc?rev=1754256&view=rev
Log:
SLING-5898 Point to the alternative repository if specified on the command-line
Modified:
sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java
Modified: sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java?rev=1754256&r1=1754255&r2=1754256&view=diff
==============================================================================
--- sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java (original)
+++ sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java Wed Jul 27 12:12:55 2016
@@ -32,6 +32,7 @@ import static org.ops4j.pax.exam.CoreOpt
import static org.ops4j.pax.exam.CoreOptions.keepCaches;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import static org.ops4j.pax.exam.CoreOptions.when;
public abstract class TestSupport {
@@ -61,9 +62,13 @@ public abstract class TestSupport {
}
protected Option baseConfiguration() {
+ final String localRepository = System.getProperty("maven.repo.local", ""); // PAXEXAM-543
return composite(
- keepCaches(),
systemProperty("pax.exam.osgi.unresolved.fail").value("true"),
+ when(localRepository.length() > 0).useOptions(
+ systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepository)
+ ),
+ keepCaches(),
CoreOptions.workingDirectory(workingDirectory()),
mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.testing.paxexam").versionAsInProject()
);