jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Eclipse Plugin
  • MECLIPSE-269

"Can't canonicalize system path" error using the goal eclispse:eclipse

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 2.3
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    maven-eclipse-plugin version 2.3
    maven-war-plugin version 2.0.2

Description

I get a "Can't canonicalize system path" error using the goal eclispse:eclipse when
the <warSourceDirectory> of the maven-war-plugin starts with ${basedir}. If I remove the
${basedir}, the build is successful.

If, as it appears, the war plugin uses different rules related to the prefixing a path with ${basedir}, then I consider it a bug because the configuration of <warSourceDirectory> is inconsistant with similar tags.

Per Wayne Fay, I have log this issue against the Eclipse plugin.

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can't canonicalize system path: C:\cvs_apms\ipim-webapp\C:\cvs_apms\ipim-webapp\src\webapp

Embedded error: The filename, directory name, or volume label syntax is incorrect
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can't canonicalize system path: C:\cvs_apms\ipim-webapp\C:\cvs_apms\ipim-webapp\src\webapp
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can't canonicalize system path: C:\cvs_apms\ipim-webapp\C:\cvs_apms\ipim-webapp\src\webapp
at org.apache.maven.plugin.ide.IdeUtils.getCanonicalPath(IdeUtils.java:77)
at org.apache.maven.plugin.ide.IdeUtils.toRelativeAndFixSeparator(IdeUtils.java:89)
at org.apache.maven.plugin.eclipse.writers.EclipseWtpComponentWriter.writeModuleTypeComponent(EclipseWtpComponentWriter.java:142)
at org.apache.maven.plugin.eclipse.writers.EclipseWtpComponentWriter.write(EclipseWtpComponentWriter.java:97)
at org.apache.maven.plugin.eclipse.EclipsePlugin.writeConfiguration(EclipsePlugin.java:671)
at org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractIdeSupportMojo.java:402)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
... 16 more
Caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:354)
at java.io.File.getCanonicalPath(File.java:513)
at org.apache.maven.plugin.ide.IdeUtils.getCanonicalPath(IdeUtils.java:73)
... 23 more
[INFO] ------------------------------------------------------------------------

Paul Spencer

Issue Links

depends upon

Bug - A problem which impairs or prevents the functions of the product. MNG-3747 relative build paths are not path-translated when using prefixed expressions (eg. project.build.directory) in plugin configurations

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
relates to

Bug - A problem which impairs or prevents the functions of the product. MECLIPSE-608 "Can't canonicalize system path" error using the goal eclispse:eclipse

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Arnaud Heritier added a comment - 20/Apr/09 5:41 PM

This is a core problem fixed in maven 2.1.0

Show
Arnaud Heritier added a comment - 20/Apr/09 5:41 PM This is a core problem fixed in maven 2.1.0
Hide
Permalink
Matthew McCullough added a comment - 05/Jan/10 8:59 PM

I don't think this is a core issue, because I encountered a very similar message:
Cant canonicalize system path: {0}

After much searching through code, I found the solution in an unlikely place. The resource tag documentation.

Quoted from my comments on MECLIPSE:-608: http://jira.codehaus.org/browse/MECLIPSE-608
>>
Typically, the cause of this is because a POM author put a replaceable like ${basedir} in the target or directory tags. This is not allowed. Target and Directory tags are relative to the POM, and are not supposed to have drive letters and paths to roots of the filesystem.

http://maven.apache.org/ref/2.2.1/maven-model/maven.html#class_resource

If you remove the ${basedir} type references from the paths, the plugin works just fine.
<<

Show
Matthew McCullough added a comment - 05/Jan/10 8:59 PM I don't think this is a core issue, because I encountered a very similar message: Cant canonicalize system path: {0} After much searching through code, I found the solution in an unlikely place. The resource tag documentation. Quoted from my comments on MECLIPSE:-608: http://jira.codehaus.org/browse/MECLIPSE-608 >> Typically, the cause of this is because a POM author put a replaceable like ${basedir} in the target or directory tags. This is not allowed. Target and Directory tags are relative to the POM, and are not supposed to have drive letters and paths to roots of the filesystem. http://maven.apache.org/ref/2.2.1/maven-model/maven.html#class_resource If you remove the ${basedir} type references from the paths, the plugin works just fine. <<
Hide
Permalink
David Hoffer added a comment - 31/Mar/10 3:16 PM

I have the same problem using maven 2.1.0.

[INFO] Cant canonicalize system path: {0}
Embedded error: The filename, directory name, or volume label syntax is incorrect

The module that is failing does not use ${basedir} but some parent/sibling modules do...but they need it to know their relative location. That's a valid maven tag so I don't know why this can just be ignored.

Show
David Hoffer added a comment - 31/Mar/10 3:16 PM I have the same problem using maven 2.1.0. [INFO] Cant canonicalize system path: {0} Embedded error: The filename, directory name, or volume label syntax is incorrect The module that is failing does not use ${basedir} but some parent/sibling modules do...but they need it to know their relative location. That's a valid maven tag so I don't know why this can just be ignored.
Hide
Permalink
David Hoffer added a comment - 31/Mar/10 3:56 PM

Okay, i got around this one by using .. notation, but I don't see why the plugin can't be smart...it ought to work with all maven properties, imho.

Show
David Hoffer added a comment - 31/Mar/10 3:56 PM Okay, i got around this one by using .. notation, but I don't see why the plugin can't be smart...it ought to work with all maven properties, imho.

People

  • Assignee:
    Unassigned
    Reporter:
    Paul Spencer
Vote (1)
Watch (1)

Dates

  • Created:
    21/May/07 2:36 PM
    Updated:
    31/Mar/10 3:56 PM
    Resolved:
    20/Apr/09 5:42 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.