Pax Exam: Resolve Karaf feature repository (XML file) from non-standard Maven repository

144 Views Asked by At

I am using Pax Exam and am trying to resolve a feature repository and the contained features via a nonstandard maven repository.

CoreOptions.repository() (followed by CoreOptions.cleanCaches() seems not to have any influence on the behaviour of Karaf itself. The etc/org.ops4j.pax.url.mvn.cfg only lists maven central, which is indeed the only repository that is search for my KarafDistributionOption.feature(). (As evidenced by the Karaf log) I am able to specify a direct http://-Url to the feature repository which gets resolved successfully. Then however the resolution of all bundles referenced from this repository fails, as they are part of the same repository.

1

There are 1 best solutions below

0
kladderradatsch On

You could use this in your Pax Exam configuration for adding any additional Maven Repository:

KarafDistributionOption.
    editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", 
    "org.ops4j.pax.url.mvn.repositories", "http://<YOUR-INTERNAL-MAVENREPO>");