ops4j / org.ops4j.pax.exam2

Pax Exam is a testing framework for OSGi
https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/
Apache License 2.0
84 stars 100 forks source link

Can not configure snapshot repository for 'KarafDistributionBaseConfigurationOption' [PAXEXAM-590] #706

Open ops4j-issues opened 10 years ago

ops4j-issues commented 10 years ago

Christoph Emmersberger created PAXEXAM-590

Hi

I've been trying to configure a custom snapshot repository within my karaf distribution configuration options.
It turned out, that it is not possible to configure the repository option via the following command:

commonOptions()

public Option[] commonOptions() {
  return new Option[]{
    karafDistributionConfiguration()
    ...,
    repository("http://repository.apache.org/content/groups/snapshots-group").allowSnapshots().disableReleases().id("apache")
  }
}

It had no effect at all during the test execution and I was not able to pull any snapshot artefact from the Apache snapshot repository. To get this working, I had to overwrite the org.ops4j.pax.url.mvn.cfg via the following command:

commonOptions()

editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
  "org.ops4j.pax.url.mvn.repositories",
  "http://repo1.maven.org/maven2@id=central, "
  + ...          
  + "http://repository.apache.org/content/groups/snapshots-group@snapshots@noreleases@id=apache")

Since I do not think, that this is working as intended, I would like to open a bug to track this issue. If anyone knows, how to resolve this, please let me know.

Kind regards,

Christoph


Affects: 3.3.0 Votes: 0, Watches: 2

ops4j-issues commented 10 years ago

Christoph Emmersberger commented

Please find attached the discussion on this issue:

http://karaf.922171.n3.nabble.com/Issues-when-configuring-PAX-EXAM-maven-repository-td4031147.html