Have you tried with the karaf-maven-plugin from 3.0.0-SNAPSHOT?  It's a little 
tricky to get configured, but it uses Sonatype Aether, so it likely will talk 
to configured repositories more reliably.  

If you want to give it a try, first take a look at [1].  This provides most of 
what you need for a basic use case.  Additionally, I've just posted some 
additional documentation for the plugin itself that can most easily be seen at 
[2].  Since I have my head around it at this point, I'm happy to do what I can 
here to answer questions as well.

One of the things I've been doing for my own projects is to make each project 
generate their own features.xml, then have another project combine them all.  
It seems to be working pretty well.  I have not found any gotchas to using the 
3.0.0-SNAPSHOT plugin with the 2.2.x branch of code.

[1] 
https://github.com/apache/karaf/blob/trunk/tooling/karaf-maven-plugin/src/site/apt/usage.apt
[2] 
https://github.com/topping/karaf/commit/5b1bca64adbcbe67ef7248631f128070dbad3642#diff-8

Hope that helps, Brian

On Apr 23, 2012, at 8:38 PM, ibarnett wrote:

> I have a project that uses the features-maven-plugin to create a new
> distribution of Karaf.  In the configuration of the plugin, I pull in the
> features for Camel 2.9.1.  As shown below:
> 
> <plugin>
>        <groupId>org.apache.karaf.tooling</groupId>
>        <artifactId>features-maven-plugin</artifactId>
>        <version>2.2.5</version>
>        <executions>
>          <execution>
>            <id>add-features-to-repo</id>
>            <phase>generate-resources</phase>
>            <goals>
>              <goal>add-features-to-repo</goal>
>            </goals>
>            <configuration>
>              <descriptors>
>               ...
> 
> <descriptor>mvn:org.apache.camel.karaf/apache-camel/2.9.1/xml/features</descriptor>
>              ...
>              </descriptors>
>              <repository>myDistribution/system</repository>
>            </configuration>
>          </execution>
>        </executions>
>      </plugin>
> 
> 
> I have an internal Maven repository set up, and in my Maven settings.xml I
> have specified a Mirror for all repository requests.  When I build my
> project, it resolves most of the dependencies correctly.  However, when
> Maven attempts to resolve some of the dependencies in the Camel features
> file, it appears to ignore my mirror setting and go straight to the internet
> to download the dependencies.  The lines from the Camel features file that
> my build has issues with are the following:
> <bundle
> dependency='true'>mvn:http://maven.restlet.org!org.restlet.jse/org.restlet/2.0.10</bundle>
>     
> org/apache/camel/karaf/apache-camel/2.9.1/apache-camel-2.9.1-features.xml:   
> <bundle>mvn:http://scriptengines.googlecode.com/svn/m2-repo/!com.google.code.scriptengines/scriptengines-jruby/1.1</bundle>
> org/apache/camel/karaf/apache-camel/2.9.1/apache-camel-2.9.1-features.xml:   
> <bundle>mvn:http://scriptengines.googlecode.com/svn/m2-repo/!com.google.code.scriptengines/scriptengines-javascript/1.1</bundle>
> org/apache/camel/karaf/apache-camel/2.9.1/apache-camel-2.9.1-features.xml:   
> <bundle>mvn:http://scriptengines.googlecode.com/svn/m2-repo/!com.google.code.scriptengines/scriptengines-groovy/1.1</bundle>
> 
> In the Maven build output I see: "Downloading:
> http://maven.restlet.org/org/restlet/jse/org.restlet/2.0.10/org.restlet-2.0.10.jar.";
>  
> I was expecting to see "Downloading:
> http://<INTERNAL_REPO>//org/restlet/jse/org.restlet/2.0.10/org.restlet-2.0.10.jar"
>   
> 
> This only happens for bundles in the feature file that specify an HTTP URL
> instead of just "mvn:groupId:artifactId:version".  
> 
> Is it expected that the features-maven-plugin would not go through the Maven
> Mirror in this case?  
> 
> Thanks for the help.  
> 
> 
> 
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/features-maven-plugin-doesn-t-appear-to-obey-Maven-settings-xml-Mirror-tp3934042p3934042.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to