[ 
https://issues.apache.org/jira/browse/SLING-5898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15394481#comment-15394481
 ] 

Robert Munteanu commented on SLING-5898:
----------------------------------------

Yes, it is an issue. Try the following:

1. Install a SNAPSHOT bundle in a non-standard repo location, e.g. 
{{bundles/extensions/adapter}}

{{mvn clean install -Dmaven.repo.local=$HOME/.m2/repo-tmp}}

2. Patch the event its to reference this SNAPSHOT, e.g.

{noformat}diff --git 
a/bundles/extensions/event/src/test/java/org/apache/sling/event/it/AbstractJobHandlingTest.java
 
b/bundles/extensions/event/src/test/java/org/apache/sling/event/it/AbstractJobHandlingTest.java
index 821b651..a613f3e 100644
--- 
a/bundles/extensions/event/src/test/java/org/apache/sling/event/it/AbstractJobHandlingTest.java
+++ 
b/bundles/extensions/event/src/test/java/org/apache/sling/event/it/AbstractJobHandlingTest.java
@@ -150,7 +150,7 @@ public abstract class AbstractJobHandlingTest {
 
                 mavenBundle("org.apache.sling", "org.apache.sling.api", 
"2.9.0"),
                 mavenBundle("org.apache.sling", 
"org.apache.sling.resourceresolver", "1.2.6"),
-                mavenBundle("org.apache.sling", "org.apache.sling.adapter", 
"2.1.2"),
+                mavenBundle("org.apache.sling", "org.apache.sling.adapter", 
"2.1.9-SNAPSHOT"),
                 mavenBundle("org.apache.sling", 
"org.apache.sling.jcr.resource", "2.5.6"),
                 mavenBundle("org.apache.sling", 
"org.apache.sling.jcr.classloader", "3.2.2"),
                 mavenBundle("org.apache.sling", 
"org.apache.sling.jcr.contentloader", "2.1.8"),
{noformat}

{{mvn clean verify}} will fail the build since the bundle can't be resolved: 
Could not find artifact 
org.apache.sling:org.apache.sling.adapter:jar:2.1.9-SNAPSHOT

3. Run the build with the {{-Dmaven.alternate.repo}} flag

{{mvn clean verify -Dmaven.repo.local=$HOME/.m2/repo-tmp}}

Now the build succeeds.

4. Finally, remove the lines that bridge between the Maven system property and 
Pax-Exam one from {{AbstractJobHandlingTest}}. The {{mvn}} command that 
previously succeeded will fail → the issue still exists.

> Point to the alternative repository if specified on the command-line
> --------------------------------------------------------------------
>
>                 Key: SLING-5898
>                 URL: https://issues.apache.org/jira/browse/SLING-5898
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Robert Munteanu
>             Fix For: Testing Pax Exam 0.0.2
>
>
> This is basically SLING-2847 and SLING-2848 applied to the new module. 
> This will help with the situation where we have SNAPSHOT dependencies which 
> by design aren't resolved from the reactor by Pax-Exam.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to