You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Harry Smith (JIRA)" <ji...@apache.org> on 2015/02/07 00:18:35 UTC

[jira] [Created] (KARAF-3506) karaf-maven-plugin doesn't handle leading whitespace on config file locations

Harry Smith created KARAF-3506:
----------------------------------

             Summary: 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


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)