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

Jean-Baptiste Onofré resolved KARAF-3506.
-----------------------------------------
    Resolution: Fixed

> karaf-maven-plugin doesn't handle leading whitespace on config file locations
> -----------------------------------------------------------------------------
>
>                 Key: KARAF-3506
>                 URL: https://issues.apache.org/jira/browse/KARAF-3506
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-tooling
>    Affects Versions: 4.0.0.M1
>            Reporter: Harry Smith
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 4.0.0, 3.0.4
>
>         Attachments: pom.xml
>
>
> Attempting to build custom karaf distributions using the karaf-maven-plugin 
> to add features with config files with leading white space causes errors 
> similar to the following:
> [WARNING] == Installing configuration file
>             mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0/cfg/filesystem
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 6.487s
> [INFO] Finished at: Fri Feb 06 17:13:52 CST 2015
> [INFO] Final Memory: 12M/170M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.karaf.tooling:karaf-maven-plugin:4.0.0.M1:install-kars 
> (default-install-kars) on project karaf-tooling-bug: Can not install 
> cave-server feature: Illegal character in scheme name at index 0:
> [ERROR] mvn:org.apache.karaf.cave/apache-karaf-cave/3.0.0/cfg/filesystem
> In the above case, it appears that the source of the problem is that the 
> configuration file location in apache-karaf-cave has a new line at the 
> beginning of it that isn't handled correctly on line 537 of 
> org.apache.karaf.tooling.features.InstallKarsMojo.java in the 
> installConfigFile method: 
> String configFileLocation = configFile.getLocation(); 
> updating that line to: 
> String configFileLocation = configFile.getLocation().trim(); 
> resolves the problem.



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

Reply via email to