Hi,

it's a "known issue":

https://issues.apache.org/jira/browse/KARAF-846

It should be fixed soon.

Regards
JB

On 04/24/2012 02:38 AM, 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.

--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to