Hi JB,
I analysed our Nexus and found out that all required artefacts are available. However karaf 3.0.3 can not find them if a mirror is defined in settings.xml. In karaf 3.0.1 it worked fine.
How can I enable aether logging to analyze the problem? Regards Richard Am 03.02.2015 um 16:41 schrieb Jean-Baptiste Onofré:
Hi Richard, thanks for the update. Regards JB On 02/03/2015 04:34 PM, Richard Hierlmeier wrote:Hi JB, I were wrong, the problem is not caused by the localRepository tag in the settings.xml. It is caused by the mirrors tag. Our mirror (local Nexus) does not proxy all required repositories, but all requests were forwarded to the mirror. The repositories of karaf were no longer considered. I solved the problem by defining a separate settings.xml for karaf. The path to the settings.xml can be defined in ${karaf.home}/etc/org.ops4j.pax.url.mvn.cfg (the org.ops4j.pax.url.mvn.settings property). In addition I had to add our local maven repository to the karaf repositories in ${karaf.home}/etc/org.ops4j.pax.url.mvn.cfg. I had to add two repositories, one for releases and one for snapshots. -- BEGIN org.ops4j.pax.url.mvn.cfg ----------------------------- ... org.ops4j.pax.url.mvn.settings= ${karaf.home}/mvn/settings.xml ... org.ops4j.pax.url.mvn.repositories= \ http://mynexus/nexus/content/groups/public@id=mynexus, \ http://mynexus/nexus/content/repositories/snapshots/@id=mynexus_snapshots@snapshots@noreleases, \ ... http://repo1.maven.org/maven2@id=central, \ ... -- END org.ops4j.pax.url.mvn.cfg ----------------------------- Now it works fine. Thank you for your help. Regards Richard Am 02.02.2015 um 17:57 schrieb Jean-Baptiste Onofré:Maybe you didn't do full mvn clean install to populate your repo, or your pom.xml doesn't contain all required <dependency/>. Regards JB On 02/02/2015 05:18 PM, Richard Hierlmeier wrote:I just upgraded from karaf 3.0.1 to karaf 3.0.3. With 3.0.3 I were not able to install the war feature: karaf@root()> feature:install -v war Installing feature war 3.0.2 Installing feature http 3.0.2 Installing feature pax-http 3.1.2 Installing feature pax-jetty 8.1.15.v20140411 Found installed bundle: org.apache.servicemix.specs.activation-api-1.1 [65] Found installed bundle: org.apache.geronimo.specs.geronimo-servlet_3.0_spec [66] Found installed bundle: javax.mail [67] Found installed bundle: org.apache.geronimo.specs.geronimo-jta_1.1_spec [68] Found installed bundle: org.apache.geronimo.specs.geronimo-annotation_1.1_spec [69] Found installed bundle: org.apache.geronimo.specs.geronimo-jaspic_1.0_spec [70] Found installed bundle: org.objectweb.asm.all [71] Found installed bundle: org.eclipse.jetty.aggregate.jetty-all-server [72] Checking configuration file mvn:org.ops4j.pax.web/pax-web-features/3.1.2/xml/jettyconfig Error executing command: Error resolving artifact org.ops4j.pax.web:pax-web-features:xml:jettyconfig:3.1.2: Could not find artifact org.ops4j.pax.web:pax-web-features:xml:jettyconfig:3.1.2 The cause of the problem is a local repository definition in ${user.home}/.m2/settings.xml: <settings> <localRepository>${user.home}/.m2/temp_repository</localRepository> <mirrors> <mirror> <id>MY_NEXUS</id> <url>http://mynexus/nexus/content/groups/public/</url> <mirrorOf>*</mirrorOf> </mirror> </mirrors> </settings> If I remove the localRepository tag from settings.xml the installation works fine. It this a known bug? Should I file a jira? Thank you Richard
