You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by brettcave <br...@jemstep.com> on 2012/02/06 15:11:44 UTC

Unable to resolve SNAPSHOT artifacts from local maven repo

I have a problem where karaf (2.2.4) is unable to locate SNAPSHOT versions of
artifacts.

When initially setting it up, I added a  org.ops4j.pax.url.mvn.settings
parameter to etc/org.ops4j.pax.url.mvn.cfg, and removed all
org.ops4j.pax.url.mvn.repositories entries. The settings.xml refers to a
local artifactory repository, which initially had a working configuration
for /libs-releases repository, but a misconfigured /libs-snapshots repo.

After testing on a test host, karaf was able to resolve and install osgi
services from mvn:<group>/<artifact>/<version>-SNAPSHOT without specifying a
"settings.xml", but having one in {user.home}/.m2/settings.xml. So i removed
the settings entry from the configuration file, and updated the
configuration in {user.home}/.m2/settings.xml to match. However, the karaf
on the original host still won't resolve -SNAPSHOT artifacts:
     java.lang.RuntimeException: URL
[mvn:com.mycompany.group/aeon-osgi/1.0-SNAPSHOT] could not be resolved.

Are the maven settings stored somewhere in a cache that karaf will not
resolve snapshots? Settings.xml and the ops4j.pax.url.mvn.cfg files are
pretty much identical on both hosts


--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-resolve-SNAPSHOT-artifacts-from-local-maven-repo-tp3719712p3719712.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Unable to resolve SNAPSHOT artifacts from local maven repo

Posted by brettcave <br...@jemstep.com>.
Thanks to jbonofre for assisting with this

The problem was that there is apparently a bug with using authenticated
repositories. The settings.xml had URLs with <server> configuration for
username and password. By removing the settings.xml from the host and
configuring etc/org.ops4j.pax.url.mvn.config with:
org.ops4j.pax.url.mvn.repositories= \
    http://user:pass@artifactory.local/artifactory/repo@snapshots

The resolution of artifacts worked.

--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-resolve-SNAPSHOT-artifacts-from-local-maven-repo-tp3719712p3720001.html
Sent from the Karaf - User mailing list archive at Nabble.com.