8 Replies Latest reply on Mar 12, 2010 7:10 AM by njiang

    FUSE features:install does not use Maven settings.xml for 'mvn:' protocol

    jwebb

      FUSE ESB Version: 4.1.0.2

       

      I am currently trying to install a feature using a custom feature file. The feature file references bundles using the 'mvn:groupId/artifactId/version[/type]' protocol. This works perfectly locally when I have run 'mvn install' successfully and the required artifacts are in my '${user.home}/.m2/repository'. These artifacts are deployed to our internal Nexus server as part of our continuous integration build.

       

      When I try to use the same features file on our test FUSE server (which does not have the artifacts locally in it's .m2 repository), the builds fails as expected because it cannot find the bundles. We have tryed a couple things:

      • Adding our Nexus repository into our ${user.home}/.m2/settings.xml

      • Adding our Nexus repository into our $/conf/settings.xml

       

      We tryed the two things mentioned above because of the way artifact resolution is described in the MVN protocol spec. Both of the above settings did work properly when using mvn from the command line to build projects with dependencies only available in our Nexus.

       

      I also found a 1.0.0.CR1 Released! someone was having related to using a proxy in their settings.xml file and it wasn't being utilized by FUSE through the mvn: protocol in a custom feature. His issue was resolved by what appears to be magic because he claims "it just started working". Unfortunately, I have not been so lucky. Any information or tips on other things I could try would be greatly appreciated!

       

      settings.xml

      -


      <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0

      http://maven.apache.org/xsd/settings-1.0.0.xsd">

      <profiles>

      <profile>

      <id>defaultProfile</id>

      <activation>

      <activeByDefault>true</activeByDefault>

      </activation>

      <repositories>

      <repository>

      <id>nexus</id>

      <name>Point2 Nexus Snapshot Repo</name>

      &lt;url&gt;http://nexus/content/repositories/snapshots/</url>

      &lt;/repository&gt;

      &lt;/repositories&gt;

      &lt;/profile&gt;

      &lt;profile&gt;

      &lt;id&gt;local&lt;/id&gt;

      &lt;properties&gt;

      &lt;fuse.home&gt;C:\progress\fuse-esb-4.1.0.2&lt;/fuse.home&gt;

      &lt;/properties&gt;

      &lt;/profile&gt;

      &lt;/profiles&gt;

      &lt;/settings&gt;

       

      -


      features.xml

      -


      &lt;?xml version="1.0" encoding="UTF-8"?&gt;

      &lt;features&gt;

      &lt;feature name="public-engine" version="1.0.0"&gt;

      &lt;feature version="1.6.1.0-fuse"&gt;camel-mail&lt;/feature&gt;

      &lt;feature version="1.6.1.0-fuse"&gt;camel-jms&lt;/feature&gt;

      &lt;feature version="1.6.1.0-fuse"&gt;camel-quartz&lt;/feature&gt;

      &lt;feature version="1.6.1.0-fuse"&gt;camel-ftp&lt;/feature&gt;

      &lt;feature version="1.6.1.0-fuse"&gt;camel-velocity&lt;/feature&gt;

      &lt;bundle&gt;mvn:com.mydomain.syndication/engine/1.0.0-SNAPSHOT&lt;/bundle&gt;

      &lt;bundle&gt;mvn:com.mydomain.syndication/engine-web/1.0.0-SNAPSHOT/war&lt;/bundle&gt;

      &lt;/feature&gt;

      &lt;/features&gt;

      -


      FUSE console output

      -


      smx@root:features&gt; addUrl file:E:/mydomain/trunk/syndication/scripts/features.xml

      smx@root:features&gt; list | grep public

      uninstalled  http://      1.0.0 public-engine

      smx@root:features&gt; install public-engine

      ERROR CommandLineExecutionFailed: org.apache.geronimo.gshell.command.CommandException: java.lang.RuntimeException:

      URL mvn:com.mydomain.syndication/engine/1.0.0-SNAPSHOT could not be resolved. (enable TRACE logging for details)-----

      -


       

      Edited by: jwebb on Feb 2, 2010 4:19 PM

      - Sorry for bad formatting; attaching files for better readability.