karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Shakirin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KARAF-5199) Karaf installs both version of the feature (old and new) in case if referencing feature contains wrapped bundle with package import
Date Mon, 12 Jun 2017 09:57:00 GMT

     [ https://issues.apache.org/jira/browse/KARAF-5199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrei Shakirin updated KARAF-5199:
-----------------------------------
    Attachment:     (was: test-feature-project.zip)

> 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
>         Attachments: org.apache.karaf.features.cfg
>
>
> 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)

Mime
View raw message