You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2007/07/14 14:59:13 UTC
[jira] Updated: (SUREFIRE-342) Tests fail if JAVA_HOME path
contains spaces
[ http://jira.codehaus.org/browse/SUREFIRE-342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated SUREFIRE-342:
----------------------------------
Description:
Did default install of jdk1.5.0_12
Set JAVA_HOME environment variable to C:\Program Files\Java\jdk1.5.0_12
Did 'mvn clean test'
Maven fails with this message:
[DEBUG] Using JVM: C:\Program Files\Java\jdk1.5.0_12\jre\bin\java
[INFO] Surefire report directory: C:\EclipseProjects\TNManage\target\surefire-reports
Forking command line: "C:\Program Files\Java\jdk1.5.0_12\jre\bin\java" -classpath "C:\Documents and Settings\ssteph\.m2\repository\org\codehaus\plexus\plexus-archiver\1.0-alpha-7\plexus-archiver-1.0-alpha-7.jar;C:\Documents and Settings\ssteph\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar;C:\Documents and Settings\ssteph\.m2\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-8\plexus-container-default-1.0-alpha-8.jar;C:\Documents and Settings\ssteph\.m2\repository\org\apache\maven\surefire\surefire-booter\2.4-SNAPSHOT\surefire-booter-2.4-SNAPSHOT.jar;C:\Documents and Settings\ssteph\.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar;C:\Documents and Settings\ssteph\.m2\repository\org\apache\maven\surefire\surefire-api\2.4-SNAPSHOT\surefire-api-2.4-SNAPSHOT.jar;C:\Documents and Settings\ssteph\.m2\repository\commons-lang\commons-lang\2.1\commons-lang-2.1.jar;C:\Documents and Settings\ssteph\.m2\repository\org\codehaus\plexus\plexus-utils\1.4.1-SNAPSHOT\plexus-utils-1.4.1-SNAPSHOT.jar;C:\Documents and Settings\ssteph\.m2\repository\org\testng\testng\5.5\testng-5.5-jdk15.jar" org.apache.maven.surefire.booter.SurefireBooter C:\DOCUME~1\ssteph\LOCALS~1\Temp\surefire60476tmp C:\DOCUME~1\ssteph\LOCALS~1\Temp\surefire60477tmp
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
[ERROR] mojo-execute : surefire:test
Diagnosis: There are test failures.
FATAL ERROR: Error executing Maven for a project
[ERROR] project-execute : edu.washington.cac.rome.tnmanage:TNManage:war:1.0 ( task-segment: [clean, test] )
Diagnosis: There are test failures.
FATAL ERROR: Error executing Maven for a project
org.apache.maven.BuildFailureException: There are test failures.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:441)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:382)
at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:68)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:424)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 8 more
It fails because of the whitespace in C:\Program Files. I can make it work by copying the JDK to a folder whose name does not contain spaces and point JAVA_HOME to it. When I do this, everything works fine. This isn't a long-term solution though, as it requires a special-case install of the JDK.
This seems to be a new bug in the 2.4-SNAPSHOT. We had to move to this because we're using the latest TestNG, which requires it. Before this, we used jUnit with version 2.3 of SUREFIRE and things worked fine.
was:
Did default install of jdk1.5.0_12
Set JAVA_HOME environment variable to C:\Program Files\Java\jdk1.5.0_12
Did 'mvn clean test'
Maven fails with this message:
[DEBUG] Using JVM: C:\Program Files\Java\jdk1.5.0_12\jre\bin\java
[INFO] Surefire report directory: C:\EclipseProjects\TNManage\target\surefire-reports
Forking command line: "C:\Program Files\Java\jdk1.5.0_12\jre\bin\java" -classpath "C:\Documents and Settings\ssteph\.m2\repository\org\codehaus\plexus\plexus-archiver\1.0-alpha-7\plexus-archiver-1.0-alpha-7.jar;C:\Documents and Settings\ssteph\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar;C:\Documents and Settings\ssteph\.m2\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-8\plexus-container-default-1.0-alpha-8.jar;C:\Documents and Settings\ssteph\.m2\repository\org\apache\maven\surefire\surefire-booter\2.4-SNAPSHOT\surefire-booter-2.4-SNAPSHOT.jar;C:\Documents and Settings\ssteph\.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar;C:\Documents and Settings\ssteph\.m2\repository\org\apache\maven\surefire\surefire-api\2.4-SNAPSHOT\surefire-api-2.4-SNAPSHOT.jar;C:\Documents and Settings\ssteph\.m2\repository\commons-lang\commons-lang\2.1\commons-lang-2.1.jar;C:\Documents and Settings\ssteph\.m2\repository\org\codehaus\plexus\plexus-utils\1.4.1-SNAPSHOT\plexus-utils-1.4.1-SNAPSHOT.jar;C:\Documents and Settings\ssteph\.m2\repository\org\testng\testng\5.5\testng-5.5-jdk15.jar" org.apache.maven.surefire.booter.SurefireBooter C:\DOCUME~1\ssteph\LOCALS~1\Temp\surefire60476tmp C:\DOCUME~1\ssteph\LOCALS~1\Temp\surefire60477tmp
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
[ERROR] mojo-execute : surefire:test
Diagnosis: There are test failures.
FATAL ERROR: Error executing Maven for a project
[ERROR] project-execute : edu.washington.cac.rome.tnmanage:TNManage:war:1.0 ( task-segment: [clean, test] )
Diagnosis: There are test failures.
FATAL ERROR: Error executing Maven for a project
org.apache.maven.BuildFailureException: There are test failures.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:441)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:382)
at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:68)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:424)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 8 more
It fails because of the whitespace in C:\Program Files. I can make it work by copying the JDK to a folder whose name does not contain spaces and point JAVA_HOME to it. When I do this, everything works fine. This isn't a long-term solution though, as it requires a special-case install of the JDK.
This seems to be a new bug in the 2.4-SNAPSHOT. We had to move to this because we're using the latest TestNG, which requires it. Before this, we used jUnit with version 2.3 of SUREFIRE and things worked fine.
Fix Version/s: 2.4
where do you obtain your 2.4-SNAPSHOT from? If it is from the snapshot repository, what is the build number?
> Tests fail if JAVA_HOME path contains spaces
> --------------------------------------------
>
> Key: SUREFIRE-342
> URL: http://jira.codehaus.org/browse/SUREFIRE-342
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.4
> Environment: Windows XP
> Reporter: Scott Stephenson
> Fix For: 2.4
>
>
> Did default install of jdk1.5.0_12
> Set JAVA_HOME environment variable to C:\Program Files\Java\jdk1.5.0_12
> Did 'mvn clean test'
> Maven fails with this message:
> [DEBUG] Using JVM: C:\Program Files\Java\jdk1.5.0_12\jre\bin\java
> [INFO] Surefire report directory: C:\EclipseProjects\TNManage\target\surefire-reports
> Forking command line: "C:\Program Files\Java\jdk1.5.0_12\jre\bin\java" -classpath "C:\Documents and Settings\ssteph\.m2\repository\org\codehaus\plexus\plexus-archiver\1.0-alpha-7\plexus-archiver-1.0-alpha-7.jar;C:\Documents and Settings\ssteph\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar;C:\Documents and Settings\ssteph\.m2\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-8\plexus-container-default-1.0-alpha-8.jar;C:\Documents and Settings\ssteph\.m2\repository\org\apache\maven\surefire\surefire-booter\2.4-SNAPSHOT\surefire-booter-2.4-SNAPSHOT.jar;C:\Documents and Settings\ssteph\.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar;C:\Documents and Settings\ssteph\.m2\repository\org\apache\maven\surefire\surefire-api\2.4-SNAPSHOT\surefire-api-2.4-SNAPSHOT.jar;C:\Documents and Settings\ssteph\.m2\repository\commons-lang\commons-lang\2.1\commons-lang-2.1.jar;C:\Documents and Settings\ssteph\.m2\repository\org\codehaus\plexus\plexus-utils\1.4.1-SNAPSHOT\plexus-utils-1.4.1-SNAPSHOT.jar;C:\Documents and Settings\ssteph\.m2\repository\org\testng\testng\5.5\testng-5.5-jdk15.jar" org.apache.maven.surefire.booter.SurefireBooter C:\DOCUME~1\ssteph\LOCALS~1\Temp\surefire60476tmp C:\DOCUME~1\ssteph\LOCALS~1\Temp\surefire60477tmp
> 'C:\Program' is not recognized as an internal or external command,
> operable program or batch file.
> [ERROR] mojo-execute : surefire:test
> Diagnosis: There are test failures.
> FATAL ERROR: Error executing Maven for a project
> [ERROR] project-execute : edu.washington.cac.rome.tnmanage:TNManage:war:1.0 ( task-segment: [clean, test] )
> Diagnosis: There are test failures.
> FATAL ERROR: Error executing Maven for a project
> org.apache.maven.BuildFailureException: There are test failures.
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:441)
> at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:382)
> at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:68)
> Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
> at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:424)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> ... 8 more
> It fails because of the whitespace in C:\Program Files. I can make it work by copying the JDK to a folder whose name does not contain spaces and point JAVA_HOME to it. When I do this, everything works fine. This isn't a long-term solution though, as it requires a special-case install of the JDK.
> This seems to be a new bug in the 2.4-SNAPSHOT. We had to move to this because we're using the latest TestNG, which requires it. Before this, we used jUnit with version 2.3 of SUREFIRE and things worked fine.
--
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