1. Karaf
  2. KARAF-1600

Avoid duplicate feature and bundle resolution when installing cascading features


    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.8
    • Fix Version/s: 2.2.9, 2.3.0, 3.0.0
    • Component/s: None
    • Labels:


      Currently, if one has multiple features depending on each other, where the same features or bundles are referenced twice or more, Karaf will attempt to resolve/install them as many times as they are traversed.

      E.g., pseudo-code:

      feature a, contains:
        feature camel-core
        feature camel-spring
        bundle 1
        bundle 2
      feature b, contains:
        feature camel-jetty
        feature camel-http
        bundle 3
        bundle 4
      feature all, contains:
        feature a
        feature b

      When one installs feature "all", Karaf will end up resolving/attempting to install camel-core multiple times as it hits it via transitive dependencies (via a, via camel-jetty, via camel-http, etc.).

      As a result, an unnecessary delay is experienced and this could be optimised to perform a two-phase feature installation procedure instead:

      • calculate the install plan (kind of like building an effective POM in Maven) and prune duplicates
      • perform the install plan


        Raúl Kripalani created issue -
        Gert Vanthienen added a comment - Fixed in https://svn.apache.org/viewvc?view=revision&revision=1371246 for trunk https://svn.apache.org/viewvc?view=revision&revision=1371248 for karaf-2.3.x https://svn.apache.org/viewvc?view=revision&revision=1371251 for karaf-2.2.x
        Gert Vanthienen made changes -
        Field Original Value New Value
        Assignee Gert Vanthienen [ gertvanthienen ]
        Fix Version/s 2.2.9 [ 12321741 ]
        Fix Version/s 2.3.0 [ 12320554 ]
        Fix Version/s 3.0.0 [ 12316040 ]
        Affects Version/s 2.2.8 [ 12320756 ]
        Affects Version/s cellar-2.2.2 [ 12316740 ]
        Jean-Baptiste Onofré added a comment -

        As Gert fixed it on all branches (thanks a lot Gert), I resolve this Jira.

        Jean-Baptiste Onofré added a comment - As Gert fixed it on all branches (thanks a lot Gert), I resolve this Jira.
        Jean-Baptiste Onofré made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jamie goodyear made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        41d 10h 10m 1 Jean-Baptiste Onofré 10/Aug/12 04:17
        Resolved Resolved Closed Closed
        129d 7h 26m 1 Jamie goodyear 17/Dec/12 10:44


          • Assignee:
            Gert Vanthienen
            Raúl Kripalani
          • Votes:
            0 Vote for this issue
            3 Start watching this issue


            • Created: