Gary Gilchrist created KARAF-2596:
-------------------------------------

             Summary: install-kars goal of the karaf-maven-plugin ignores 
bundles listed in the features that have the "dependency" property set to "true"
                 Key: KARAF-2596
                 URL: https://issues.apache.org/jira/browse/KARAF-2596
             Project: Karaf
          Issue Type: Bug
          Components: karaf-tooling
    Affects Versions: 3.0.0.RC1
            Reporter: Gary Gilchrist
            Priority: Minor


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




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to