maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Stephenson (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (SUREFIRE-342) Tests fail if JAVA_HOME path contains spaces
Date Mon, 26 Nov 2007 16:21:57 GMT

    [ http://jira.codehaus.org/browse/SUREFIRE-342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_114927
] 

Scott Stephenson commented on SUREFIRE-342:
-------------------------------------------

Thanks Dan for following up with me.  All I am doing is setting JAVA_HOME set to:

C:\Program Files\Java\jdk1.5.0_12

Yes, I tried using

C:\Progra~1\Java\jdk1.5.0_12

But that didn't work either because within Eclipse it gets JAVA_HOME from Preferences ->
Installed JREs.  If you put Progra~1 in the 'Location' field there, Eclipse expands it automagically
to the full path.

That said, with today's snapshot things aren't working at all.  A 'mvn clean test' yields
the following exception:

[INFO] Surefire report directory: C:\EclipseProjects\TNManage\target\surefire-reports
java.lang.NoSuchMethodError: org.codehaus.plexus.util.cli.Commandline.createArg()Lorg/codehaus/plexus/util/cli/Arg;
	at org.apache.maven.surefire.booter.ForkConfiguration.createCommandLine(ForkConfiguration.java:206)
	at org.apache.maven.surefire.booter.SurefireBooter.fork(SurefireBooter.java:625)
	at org.apache.maven.surefire.booter.SurefireBooter.forkSuites(SurefireBooter.java:466)
	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesForkOnce(SurefireBooter.java:366)
	at org.apache.maven.surefire.booter.SurefireBooter.run(SurefireBooter.java:239)
	at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:451)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
	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)

> 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

       

Mime
View raw message