For the information of others that may encounter this behaviour in the near future, upgrading the JDK to version 1.5.0_22 appears to have resolved the issue.
Kind regards Kevin From: Kevin Jervis Sent: Wednesday, February 03, 2010 13:21 To: [email protected] Subject: maven-surefire-plugin: Error creating properties files for forking Hi all, I am having difficulty getting the maven-surefire-plugin to execute some test cases. It seems to be having trouble generating the properties file after compiling the tests successfully, before forking to execute the tests. The preferred environment for executing the maven build is eclipse, but the same results can be observed on the command line. The surefire plugin is configured to always fork. It doesn't display the path it is trying to write the properties to, however I would assume this in my Windows XP profile temp directory (since I have seen old surefire properties files left around in this directory in the past) i.e. C:\Documents and Settings\kjervis\Local Settings\Temp. I have also tried overriding my profile defined TMP/TEMP environment variables to point to c:\Temp. Still the issue occurs. I am currently at a loss as how to proceed. The full log can be found attached, but for convenience please find the stacktrace below: Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error creating properties files for forking; nested exception is java.io.IOException: The system cannot find the path specified at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default LifecycleExecutor.java:583) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec ycle(DefaultLifecycleExecutor.java:499) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL ifecycleExecutor.java:478) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle Failures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec ycleExecutor.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.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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: Error creating properties files for forking; nested exception is java.io.IOException: The system cannot find the path specified at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.j ava:541) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa nager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default LifecycleExecutor.java:558) ... 16 more Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: Error creating properties files for forking; nested exception is java.io.IOException: The system cannot find the path specified at org.apache.maven.surefire.booter.SurefireBooter.fork(SurefireBooter.java :629) at org.apache.maven.surefire.booter.SurefireBooter.forkSuite(SurefireBooter .java:493) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesForkPerTestSet( SurefireBooter.java:412) at org.apache.maven.surefire.booter.SurefireBooter.run(SurefireBooter.java: 249) at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.j ava:537) ... 18 more Caused by: java.io.IOException: The system cannot find the path specified at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1345) at java.io.File.createTempFile(File.java:1434) at java.io.File.createTempFile(File.java:1471) at org.apache.maven.surefire.booter.SurefireBooter.writePropertiesFile(Sure fireBooter.java:523) at org.apache.maven.surefire.booter.SurefireBooter.fork(SurefireBooter.java :621) ... 22 more Kevin Versions: maven-surefire-plugin: 2.4.3 maven: 2.0.9/2.2.1 JDK: 1.5.0_16
