-
1. Re: ServiceMix and mvn repos access
ffang Nov 10, 2010 9:23 PM (in response to pchandler)Hi,
About your questions
Questions: Is this going to work? Does "org.ops4j.pax.url.mvn.repositories" support repos with authentication? Is there a way to test connectivity with this repo?
Yes, "org.ops4j.pax.url.mvn.repositories" support it, as we have internal restrict repo and we configure it this way like
http://your_username:your_password@your_resctrict_repo/...
To test the connectivity with restrict repo I think you can
configure your maven settings.xml, add
and create a maven project on your local machine which need download artifacts from restrict repo, to see if it works.
Question: Does the mvn: URL in servicemix allow for classifier? i.e., Can I install a bundle, via mvn URL, that has a classifier? Example please?
More details please take a look at ,
actually the syntax is
mvn-uri := 'mvn:' group-id / artifact-id [ classifier ] ] ] ]
Here is an example I can come up with
mvn:org.apache.camel.karaf/apache-camel/2.4.0-fuse-01-00/xml/features
group-id org.apache.camel.karaf
artifact-id apache-camel
version 2.4.0-fuse-01-00
type xml
classifier features
http://wiki.ops4j.org/display/paxurl/Mvn+Protocol
Freeman
Edited by: ffang on Nov 11, 2010 2:22 AM
Edited by: ffang on Nov 11, 2010 2:23 AM
-
2. Re: ServiceMix and mvn repos access
pchandler Nov 18, 2010 4:35 PM (in response to ffang)Freeman,
Thanks I got this working.
For the record (help someone else), I did have an issue with maven 2.x, repository, deployment, classifiers, metadata and snapshots.
I implemented my bundle by adding a "osgi" maven classifier. I then deploying the bundle to Nexus (the repository). When the bundle is created in Nexus the timestamp/build-number is NOT getting added, because the artifact's classifier isn't included in the repository's metadata (maven-metadata.xml).
When I did a karaf@root> install mvn:..., org.ops4j.pax.url.mvn would use the timestamp/build-number in the metadata and no jar existed.
java.lang.RuntimeException: URL [mvn:com.inc.headoffice/project/1.9-SNAPSHOT/jar/osgi] could not be resolved.
Note: fix in maven 3.0.