Is the maven project you showed below really producing a feature file?
It looks more like a bundle project to me.

If you only have a bundle try:
install -s mvn:demo.service/demo.service-bundle/0.1

About the local repo. Probably your setup is correct. It is much simpler though to keep the repo at the default place.
.m2/repository below the user dir. Then you need no setup at all in karaf.

Christian

On 14.02.2014 10:39, simafengyun1984 wrote:
Hi JB,

I want to install a demo bundle from my local mvn repository.

   <modelVersion>4.0.0</modelVersion>
   <groupId>demo.service</groupId>
   <artifactId>demo.service-bundle</artifactId>
   <version>0.1</version>


I config the  below in the file org.ops4j.pax.url.mvn.cfg

*org.ops4j.pax.url.mvn.settings=C:\work\softtools\apache-maven-3.1.0\conf\settings.xml
        org.ops4j.pax.url.mvn.localRepository = C:\work\softtools\maven
repository
*

and in the setting.xml file,  I config my local repository
  *<localRepository>C:\work\softtools\maven repository</localRepository>*

But when I try to install my project's jar file from my local maven
repository, it failed.
log as below:
*karaf@root> install mvn:demo/service/demo.service-bundle/0.1
Bundle IDs:
Error executing command: Error installing bundles:
         Unable to install bundle mvn:demo/service/demo.service-bundle/0.1
karaf@root> features:addurl
mvn:demo/service/demo.service-bundle/0.1/xml/features
Error executing command: Unable to add repositories:
         URL [mvn:demo/service/demo.service-bundle/0.1/xml/features] could
not be resolved.
karaf@root> features:addurl
mvn:demo.service/demo.service-bundle/0.1/xml/features
Error executing command: Unable to add repositories:
         URL [mvn:demo.service/demo.service-bundle/0.1/xml/features] could
not be resolved.
karaf@root>*


Do you know how to config and make it works? Thank you!





--
View this message in context: 
http://karaf.922171.n3.nabble.com/How-to-add-local-mvn-repo-tp4031695.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to