Uploaded image for project: 'Pax Exam'
  1. PAXEXAM-543

Pax-Exam should respect the maven.repo.local system property

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.3
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      When running Maven builds, CI containers can be configured to use a different local repository, to better isolate concurrent builds and also to ensure that builds are reproducible. Jenkins does this usually via the maven.repo.local system property. Pax-Exam does not support it out of the box, so I need to work around it using code like

      String localRepo = System.getProperty("maven.repo.local", "");
      // other stuff...
      when(localRepo.length() > 0).useOptions(
          systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepo)
      )
      

      It would be good if Pax-Exam would do this out of the box. The error message when I fail to do this is quite confusing, and the error is hard to track down:

      java.io.IOException: Error resolving artifact org.apache.sling:org.apache.sling.hc.core:jar:0.0.1-SNAPSHOT: Could not find artifact org.apache.sling:org.apache.sling.hc.core:jar:0.0.1-SNAPSHOT in central (http://repo1.maven.org/maven2/)

        Attachments

          Activity

            People

            • Assignee:
              hwellmann Harald Wellmann
              Reporter:
              rombert Robert Munteanu
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: