Thank you! This is a great news that I don’t have to rely on maven dependencies, because bootRepositories are much more compact.
The problem is, the examples I’ve found were based on maven dependencies… My problem is solved. Best regards, Lukasz Lech From: [email protected] [mailto:[email protected]] On Behalf Of Grzegorz Grzybek Sent: Montag, 17. Dezember 2018 11:18 To: [email protected] Subject: Re: Karaf build with maven plugin - multiple versions of feature repo ignored Ah! :) You can always use: <bootRepositories> <repository>mvn:com.example/some-features/2.5.0-SNAPSHOT/xml/features</repository> <repository>mvn:com.example/some-features/3.0.0-SNAPSHOT/xml/features</repository> </bootRepositories> You don't have to rely on Maven to give karaf-maven-plugin the repositories. regards Grzegorz Grzybek pon., 17 gru 2018 o 11:15 Lukasz Lech <[email protected]<mailto:[email protected]>> napisał(a): Hello, It shouldn’t be the issue here, because my feature names are unique. My feature repositories differ only by the version. Feature names are different. The problem is, that the 2nd feature repository is ignored by maven. If karaf doesn’t get both feature from maven dependencies, it can’t resolve both features, according to my understanding how this works… Would the group or artifact id of feature repository be different (I’ve tried the trick with appending dot on the end of group id) the different versions of bundles are put in target/assembly/system so it looks like the only issue is delivering the complete feature repository list to karaf… Best regards, Lukasz Lech From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Grzegorz Grzybek Sent: Montag, 17. Dezember 2018 11:07 To: [email protected]<mailto:[email protected]> Subject: Re: Karaf build with maven plugin - multiple versions of feature repo ignored Hello Karaf treats "<feature>my-feature-2</feature>" in karaf-maven-plugin configuration as (see org.apache.karaf.profile.assembly.FeatureSelector#getMatchingFeatures()) <feature>my-feature-2/0.0.0</feature> which is effectively (using range notation): "feature-2/[0, ∞)" So you should try: <feature>my-feature-2/[2,3)</feature> <feature>my-feature-3/3</feature> Feature ranges and patterns were introduced with https://issues.apache.org/jira/browse/KARAF-5376 regards Grzegorz Grzybek pon., 17 gru 2018 o 11:00 'Achim Nierbeck' via OPS4J <[email protected]<mailto:[email protected]>> napisał(a): I guess this would have suited the Karaf mailinglist better. Never the less I think I understand your issue. As you're installing the "same" feature with just different version, the feature resolver (actually the same as for the bundle resolver) doesn't seem to understand the need for the same dependencies twice, and therefore automatically only installs the latest version. regards, Achim Am Mo., 17. Dez. 2018 um 10:55 Uhr schrieb Lukasz Lech <[email protected]<mailto:[email protected]>>: Hello, Some time ago I’ve started a thread about building Karaf distribution with maven plugin, and with your help, I’ve got a working example. However, now it’s time to add another version of some feature to the distribution (groupId and artifactId are the same, only the version differ, this is exactly why I need OSGi container instead of, say, Jetty). I have the dependencies in my pom.xml: <dependency> <groupId>com.example</groupId> <artifactId>some-features</artifactId> <version>2.5.0-SNAPSHOT</version> <classifier>features</classifier> <type>xml</type> <scope>runtime</scope> </dependency> <dependency> <groupId>com.example</groupId> <artifactId>some-features</artifactId> <version>3.0.0-SNAPSHOT</version> <classifier>features</classifier> <type>xml</type> <scope>runtime</scope> </dependency> And boot features definition: <bootFeatures> ... <feature>my-feature-2</feature> <feature>my-feature-3</feature> </bootFeatures> However, I see, that only the newest version (3) is installed. I see no error in logs. The whole setup works perfectly in stand-alone karaf, where the org.apache.karaf.features.cfg is manually edited. But when building using karaf plugin, it looks like the other feature is totally ignored. It has likely to do with inability of Maven to deal with more than 1 version of one dependency in single project? If so, how to work around it? Is there any other way to ‘tell’ karaf plugin about required dependencies than pom.xml? Best regards, Lukasz Lech -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected]<mailto:[email protected]> --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. For more options, visit https://groups.google.com/d/optout. -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected]<mailto:[email protected]> --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. For more options, visit https://groups.google.com/d/optout. -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected]<mailto:[email protected]> --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. For more options, visit https://groups.google.com/d/optout. -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected]<mailto:[email protected]> --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. For more options, visit https://groups.google.com/d/optout. -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected]<mailto:[email protected]> --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. For more options, visit https://groups.google.com/d/optout. -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected] --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
