Hi,

I am hitting interesting problem in Karaf 4.0.X:

Accordingly documentation, if feature is available in multiple versions, the 
newest version have to be installed.

Unfortunately 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:

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()>

If I try to install basit-thirdparty-jollyday feature - it works as expected: 
only 2.0.0.SNAPSHOT will be installed:

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

But if I try to install basit-test-feature, Karaf installs BOTH versions of 
basit-thirdparty-jollyday:

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()>

The issue is summarized in https://issues.apache.org/jira/browse/KARAF-5199 
including simple test project and org.apache.karaf.features.cfg to reproduce.

Any ideas why it happens?

Regards,
Andrei.

Reply via email to