[ https://issues.apache.org/jira/browse/KARAF-5199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067828#comment-16067828 ]
ASF subversion and git services commented on KARAF-5199: -------------------------------------------------------- Commit 9803938c307b4951105b8ac4def8cc5645f042f4 in karaf's branch refs/heads/master from [~gnt] [ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=9803938 ] [KARAF-5199] Fix ordering of candidates when comparing 2 bundles > Karaf installs both version of the feature (old and new) in case if > referencing feature contains wrapped bundle with package import > ----------------------------------------------------------------------------------------------------------------------------------- > > Key: KARAF-5199 > URL: https://issues.apache.org/jira/browse/KARAF-5199 > Project: Karaf > Issue Type: Bug > Components: karaf-feature > Affects Versions: 4.0.9 > Reporter: Andrei Shakirin > Assignee: Guillaume Nodet > Attachments: org.apache.karaf.features.cfg, test-feature-project.zip > > > Accordingly documentation, if feature is available in multiple versions, the > newest version have to be installed: > {code} > The <feature/> element contains the name of a feature. A specific feature > version can be defined using the version attribute to the <feature/> element > (<feature version="1.0.0">feature1</feature>). If the version attribute is > not specified, Apache Karaf will install the latest version available. > {code} > Unfortunatelly it is not always the case. > Use case: > 1) feature basit-thirdparty-jollyday references wrapped jar (jollyday > library); this feature is available in two different versions (1.0.0-SNAPSHOT > and 2.0.0-SNAPSHOT) and contains different versions of jolly (0.4.6 and 0.5.2 > correspondingly); > 2) bundle test-jolly uses packages from wrapped jar (jollyday library); > 3) feature test-feature references basit-thirdparty-jollyday and test-jolly > bundle. > Karaf repositories list contains both versions of basit-thirdparty-jollyday > and test-feature: > {code} > karaf@root()> feature:list | grep basit > basit-thirdparty-jollyday | 2.0.0.SNAPSHOT | | Uninstalled | > ccp > | > basit-thirdparty-jollyday | 1.0.0.SNAPSHOT | | Uninstalled | > ccp > | > basit-test-feature | 1.0.0.SNAPSHOT | | Uninstalled | > ccp > | > karaf@root()>{code} > If I try to install basit-thirdparty-jollyday feature - it works as expected: > only 2.0.0.SNAPSHOT will be installed: > {code} > karaf@root()> feature:install -t -v basit-thirdparty-jollyday > Adding features: basit-thirdparty-jollyday/[2.0.0.SNAPSHOT,2.0.0.SNAPSHOT] > Changes to perform: > Region: root > Bundles to install: > wrap:mvn:de.jollyday/jollyday/0.5.2 > {code} > But if I try to install basit-test-feature, Karaf installs BOTH versions of > basit-thirdparty-jollyday: > {code} > karaf@root()> feature:install -t -v basit-test-feature > Adding features: basit-test-feature/[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT] > Changes to perform: > Region: root > Bundles to install: > mvn:de.conrad.ccp.basit/test-jolly/1.0.0-SNAPSHOT > wrap:mvn:de.jollyday/jollyday/0.4.6 > wrap:mvn:de.jollyday/jollyday/0.5.2 > karaf@root()> > {code} > If I exclude bundle test-jolly from basit-test-feature, installation works as > expected again (only new jolly feature will be installed) > The test projects to reproduce the problem and org.apache.karaf.features.cfg > are attached -- This message was sent by Atlassian JIRA (v6.4.14#64029)