Thursday, June 18, 2015

How to fix "Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.7:eclipse (default-cli) on project XXX-webapp: Cant canonicalize system path: {0}: The filename, directory name, or volume label syntax is incorrect -> [Help 1]" error

Are you getting the following cryptic error message from Maven when trying to execute the eclipse:eclipse goal?

Maven goal: eclipse:eclipse


...
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.650 s
[INFO] Finished at: 2015-06-18T16:19:38-08:00
[INFO] Final Memory: 32M/357M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.7:eclipse (default-cli) on project xxx-webapp: Cant canonicalize system path: {0}: The filename, directory name, or volume label syntax is incorrect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

[ERROR]

Here's how to fix it:
Open your pom.xml and look for the <resource> tag. If it looked like this:
    <build>
        <resources>
            <resource>
                <directory>src/main/config/tomcat/META-INF</directory>
                <filtering>true</filtering>
                <targetPath>${project.build.directory}/m2e-wtp/web-resources/META-INF</targetPath>
            </resource>

            …

change it to this:

            <resource>
                <directory>src/main/config/tomcat/META-INF</directory>
                <filtering>true</filtering>
                <targetPath>m2e-wtp/web-resources/META-INF</targetPath>
            </resource>

Then run your maven goal eclipse:eclipse again. That should fix it.

1 comment:

  1. Hi, nice but a little bit out of date. Please also check my blog with IT related stuff, how to tutorials, etc: https://itcodehub.blogspot.com

    ReplyDelete