Simple one but unable to find anything solid on google. I am running Karaf and I am behind a proxy. I need to add some features to the container by executing the following command:
features:addurl mvn:org.apache.camel.karaf/apache-camel/2.9.0/xml/features
When I do this I get the following exception:
Could not add Feature Repository:
java.lang.RuntimeException: URL [mvn:org.apache.camel.karaf/apache-camel/2.9.0/xml/features] could not be resolved.
This appears to be a proxy authentication issue. Please note I have added proxy information to Maven and I can download dependencies in Maven. I suspect I need to add some information like http.proxyName or http.Proxyxxx to one of the files in the etc directory of the Karaf installation.
Any ideas out there?
UPDATE: I have found a setting in the org.ops4j.pax.url.mvn.cfg which is
org.ops4j.pax.url.mvn.proxySupport=true
I have uncommented this but I still cant authenticate. So I suspect I need to set my maven home folder somewhere.
UPDATE 2: Ok very simple thing to do:
In your Apache karaf folder there is a etc folder. Edit the org.ops4j.pax.url.mvn.cfg file. You need to perform two steps for it to work.
I restarted Karaf and I can now download/install features. I hope this helps someone someday.
So if you follow my post above you will see the two main steps in getting Karaf to work via a proxy. I am not sure if there is anything more to it so I am willing to listen to other answers. But in short edit the org.ops4j.pax.url.mvn.cfg file to point to your maven install and maven proxy settings.