Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-4255

karaf-maven-plugin does include unused feature conditional dependencies in assembly

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0.3
    • Fix Version/s: 4.0.11
    • Component/s: None
    • Labels:
      None

      Description

      I am using karaf-maven-plugin to make a custom assembly.
      I do include SCR, but I do not include webconsole.
      When I look into the system folder of my generated assembly, I can see:

      target/assembly/system/org/apache/felix/org.apache.felix.webconsole.plugins.ds/2.0.2/org.apache.felix.webconsole.plugins.ds-2.0.2.jar
      

      this correlates to the maven output:

      [INFO] Feature scr is defined as a boot feature
      [INFO] == Installing artifact mvn:org.apache.karaf.scr/org.apache.karaf.scr.command/4.0.3
      [INFO] == Installing artifact mvn:org.apache.felix/org.apache.felix.scr/2.0.2
      [INFO] == Installing artifact mvn:org.apache.felix/org.apache.felix.scr.compat/1.0.2
      [INFO] == Installing artifact mvn:org.apache.felix/org.apache.felix.webconsole.plugins.ds/2.0.2
      [INFO] == Installing artifact mvn:org.apache.felix/org.apache.felix.metatype/1.1.2
      [INFO] == Installing artifact mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/4.0.3
      

      however looking at: https://github.com/apache/karaf/blob/master/assemblies/features/standard/src/main/feature/feature.xml#L524
      you can see that this is an conditional dependency only.

      This is caused by the fact that assembly does not check if the conditional had been met:
      https://github.com/apache/karaf/blob/master/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java#L822

      I believe we need a check for the conditionals wether the condition is actually met.

        Attachments

          Activity

            People

            • Assignee:
              jbonofre Jean-Baptiste Onofré
              Reporter:
              fabianlange Fabian Lange
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: