0

I just installed apache karaf 3.0.5 on my windows machine and I can't get the webconsole to install.

Here are the steps I performed.

  1. I ran karaf.bat to start the container.
  2. Typed the command "feature:install webconsole" as per the documentation here: http://karaf.apache.org/manual/latest-3.0.x/users-guide/webconsole.html
  3. I get the following error message:

Error executing command: Can't install feature webconsole/0.0.0: Error resolving artifact org.apache.servicemix.specs:org.apache.servicemix.specs .activation-api-1.1:jar:2.5.0: Could not transfer artifact org.apache.servicemix .specs:org.apache.servicemix.specs.activation-api-1.1:jar:2.5.0 from/to (https: //nexus.mycompany.net/content/groups/public): Not authorized , ReasonPhrase:Unauthorized.

I have a maven settings.xml file with the authentication details. All of my maven projects work fine and have for years. Karaf must be looking at my settings.xml file to know to look at nexus for retrieving artifacts but it doesn't seem to be honoring the authentication information in there.

I can't find any information regarding this except some old bug reports about a similar issue in karaf 2.x that appears to have been fixed.

Any help is appreciated.

Josh Chappelle
  • 1,558
  • 2
  • 15
  • 37

1 Answers1

0

This page on maven url handlers points to a list of maven urls in a cfg file in the etc directory that it looks up to resolve artefacts. You will need to add your nexus url to org.ops4j.pax.url.mvn.repositories property in etc/org.ops4j.pax.url.cfg file which sits in your karaf installation with a username and password (preferrably a read-only user) like this https://username:password@nexus.mycompany.net/content/groups/public.

fiw
  • 716
  • 5
  • 8
  • After posting this I tried Karaf 4.0.4 and it worked as documented without changing any config file. That makes me think it's a bug in 3.0.5. – Josh Chappelle Jan 23 '16 at 15:27