build failure when executable path contains spaces --------------------------------------------------
Key: MCOMPILER-74 URL: http://jira.codehaus.org/browse/MCOMPILER-74 Project: Maven 2.x Compiler Plugin Issue Type: Bug Affects Versions: 2.0.2, 2.1 Environment: windows xp, maven 2.0.9 Reporter: Greg Hengeli When compiling a project with an executable that has spaces in its path, a build failure is encountered. This can be reproduced by following the exact example given on the Maven Compiler Plugin home page (http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html) This seems to be already mentioned in MCOMPILER-30 (which is closed) but there is a comment after it was closed stating it still doesn't work. One potential solution I have found is to use version 1.5.1 of plexus-utils - should this be updated in the maven-compiler-plugin's pom or is there a better solution? [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure Failure executing javac, but could not parse the error: 'C:\Program' is not recognized as an internal or external command, operable program or batch file. Failure executing javac, but could not parse the error: 'C:\Program' is not recognized as an internal or external command, operable program or batch file. [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.BuildFailureException: Compilation failure Failure executing javac, but could not parse the error: 'C:\Program' is not recognized as an internal or external command, operable program or batch file. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:579) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) 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.CompilationFailureException: Compilation failure Failure executing javac, but could not parse the error: 'C:\Program' is not recognized as an internal or external command, operable program or batch file. at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:562) at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:115) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) ... 17 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Mon May 19 16:54:59 CDT 2008 [INFO] Final Memory: 6M/19M [INFO] ------------------------------------------------------------------------ -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira