karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-3547) InstallKarsMojo is ignoring some of the boot features that are added to plugin bootFeatures.
Date Fri, 22 May 2015 19:34:17 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14556689#comment-14556689
] 

Jean-Baptiste Onofré commented on KARAF-3547:
---------------------------------------------

The InstallKarMojo has been refactored to parse featuresBoot (using regex) and prevent this.

> 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é
>             Fix For: 3.0.4
>
>
> 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)

Mime
View raw message