You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2015/02/25 09:57:04 UTC

[jira] [Assigned] (KARAF-3547) InstallKarsMojo is ignoring some of the boot features that are added to plugin bootFeatures.

     [ https://issues.apache.org/jira/browse/KARAF-3547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré reassigned KARAF-3547:
-------------------------------------------

    Assignee: Jean-Baptiste Onofré

> 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
>            Assignee: Jean-Baptiste Onofré
>
> 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>
>  {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)