Hey Everyone,
I currently work on a custom karaf distribution (based on 4.1.2) built using
the karaf-maven-plugin. This distribution was working perfectly offline (any
nexus server) until I added a non OSGi jar file inside one of our custom karaf
feature using the wrap:mvn protocol.
<feature name="some-feature"
<bundle>wrap:mvn:somegroup/some-artifact/0.0.1/bundle>
</feature>
The first time I ran the new distribution with a wrapped jar file, the
distribution was trying to connect to remote nexus repositories. To avoid this,
I tuned etc/org.ops4j.pax.url.mvn.cfg etc/karaf_maven_settings.xml to work
offline (only in the distribution local repository.) like this:
etc/org.ops4j.pax.url.mvn.cfg :
org.ops4j.pax.url.mvn.certificateCheck=true
org.ops4j.pax.url.mvn.settings=${karaf.home}/etc/karaf_maven_settings.xml
org.ops4j.pax.url.mvn.localRepository=${karaf.home}/${karaf.default.repository}
org.ops4j.pax.url.mvn.useFallbackRepositories=false
org.ops4j.pax.url.mvn.defaultRepositories=\
file:${karaf.home}/${karaf.default.repository}@id=system.repository@snapshots, \
file:${karaf.data}/kar@id=kar.repository@multi@snapshots, \
file:${karaf.base}/${karaf.default.repository}@id=child.system.repository@snapshots
org.ops4j.pax.url.mvn.defaultLocalRepoAsRemote = true
org.ops4j.pax.url.mvn.repositories=
karaf_maven_settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:/maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
</settings>
However, I now need to install all the dependencies of the wrap functionality
inside the local repository.
Should I add any pax-url-wrap bundle dependency into my feature "some-feature"
or is there a karaf feature I could add to my assembly that would embed all
those dependencies for me ?
Thank you very much for your help.
Regards
Seb
PS: Thank you for the great you do with Karaf !