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

install-kars goal of the karaf-maven-plugin ignores bundles listed in the features that have the "dependency" property set to "true"

    XMLWordPrintableJSON

Details

    Description

      Use case:

      1. ) Using the 'karaf-assembly' goal of the karaf-maven-plugin to create a "standalone" karaf distribution with all required dependencies stored in the system repo.

      2. ) Building the assembly with a number of <bootFeatures> that refer to the maven artifacts of karaf features in maven feature repositories. For example as described at http://karaf.apache.org/manual/latest/developers-guide/custom-distribution.html.

      Any features that are included in the assembly with bundles marked "dependency=true" will be excluded from the assembly by the InstallKarsMojo.

      For example consider the "spring" feature found within http://repo1.maven.org/maven2/org/apache/karaf/features/spring/3.0.0.RC1/spring-3.0.0.RC1-features.xml - a bundle like the one below will not be included in the assembly:

      <feature resolver="(obr)" description="Spring support"
      version="3.1.4.RELEASE" name="spring">
      <details>Spring Support</details>
      <bundle dependency="true" start-level="30">
      mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
      </bundle>

      This is very easily fixed in the maven plugin by following the same pattern used to fix KARAF-2357. An "ignoreDependenciesFlag" configuration parameter can be added to the InstallKarsMojo and interpreted in the code for example, as follows:

      // install bundles listed in install features not in system
      for (Feature feature : localRepoFeatures) {
      for (Bundle bundle : feature.getBundle()) {
      if (ignoreDependencyFlag || !bundle.isDependency()) {

      Attachments

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              ggilchrist@good.com Gary Gilchrist
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: