karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohammad Shamsi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-3547) InstallKarsMojo is ignoring some of the boot features that are added to plugin bootFeatures.
Date Tue, 24 Feb 2015 21:16:06 GMT
Mohammad Shamsi created KARAF-3547:
--------------------------------------

             Summary: InstallKarsMojo is ignoring some of the boot features that are added
to plugin bootFeatures. 
                 Key: KARAF-3547
                 URL: https://issues.apache.org/jira/browse/KARAF-3547
             Project: Karaf
          Issue Type: Bug
          Components: karaf-tooling
    Affects Versions: 3.0.3
            Reporter: Mohammad Shamsi


Given following configuration in karaf-maven-plugin: 
{code:xml}
                <configuration>
                    <bootFeatures>
                        <feature>cxf</feature>
                        <feature>cxf-bean-validation</feature>
                        <feature>hibernate-validator</feature>
                        <feature>hibernate</feature>
                    </bootFeatures>
                </configuration>
            </plugin>
{code}
Sometimes, depnding on os and jdk, *cxf* or *hibernate* is NOT included in the generated *featuresBoot*
property in the *etc/org.apache.karaf.features.cfg* file. 

The root cause of the issue is in *InstallKarsMojo* which is simply using *String.contains(String)*
to find out if the feature is already added to the list of boot features or not. 

code snippet from *InstallKarsMojo.java* line 257:
{code:java}
if (!featuresBoot.contains(feature.getName())) {
    featuresBoot = featuresBoot + feature.getName();
    featuresProperties.put(FEATURES_BOOT, featuresBoot);
    featuresProperties.save(featuresCfgFile);
} 
{code}

Example:
Let's assume the *current featuresBoot* is "foo, *cxf-bean-validator*, bar"  
and the new feature to include in boot features is "*cxf*",  
then *featuresBoot.contains("cxf")* returns true and therefore cxf will NOT be included in
the final generated boot features. 





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message