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

 

[DEBUG] Configuring mojo 
'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test' -->
[DEBUG]   (f) basedir = C:\Sonic\SDPTools\workspace\sub-sub-process
[DEBUG]   (f) childDelegation = false
[DEBUG]   (f) classesDirectory = 
C:\Sonic\SDPTools\workspace\sub-sub-process\target\classes
[DEBUG]   (f) classpathElements = 
[C:\Sonic\SDPTools\workspace\sub-sub-process\target\test-classes, 
C:\Sonic\SDPTools\workspace\sub-sub-process\target\classes, C:\Documents and 
Settings\kjervis\.m2\repository\junit\junit\4.6\junit-4.6.jar, C:\Documents and 
Settings\kjervis\.m2\repository\com\ba\sip\test\jms\jmsservicetester\1.0.2-SNAPSHOT\jmsservicetester-1.0.2-SNAPSHOT.jar,
 C:\Documents and 
Settings\kjervis\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar,
 C:\Documents and 
Settings\kjervis\.m2\repository\javax\jms\jms\1.1\jms-1.1.jar, C:\Documents and 
Settings\kjervis\.m2\repository\com\progress\sonic\mq\sonic_Client\7.6.1\sonic_Client-7.6.1.jar,
 C:\Documents and 
Settings\kjervis\.m2\repository\sonic-mq\sonic_Client\7.6.0\sonic_Client-7.6.0.jar,
 C:\Documents and 
Settings\kjervis\.m2\repository\com\progress\sonic\mq\sonic_Crypto\7.6.1\sonic_Crypto-7.6.1.jar,
 C:\Documents and 
Settings\kjervis\.m2\repository\com\progress\sonic\mq\sonic_XMessage\7.6.1\sonic_XMessage-7.6.1.jar,
 C:\Documents and 
Settings\kjervis\.m2\repository\com\progress\sonic\utilities\zipped-domain\7.6.2-SNAPSHOT\zipped-domain-7.6.2-SNAPSHOT.jar]
[DEBUG]   (f) disableXmlReport = false
[DEBUG]   (f) enableAssertions = true
[DEBUG]   (f) forkMode = always
[DEBUG]   (f) junitArtifactName = junit:junit
[DEBUG]   (f) localRepository = [local] -> file://C:\Documents and 
Settings\kjervis\.m2\repository
[DEBUG]   (f) pluginArtifactMap = 
{org.apache.maven:maven-project=org.apache.maven:maven-project:jar:2.0.6:runtime,
 
org.apache.maven:maven-toolchain=org.apache.maven:maven-toolchain:jar:1.0:runtime,
 org.apache.maven:maven-core=org.apache.maven:maven-core:jar:2.0.6:runtime, 
org.codehaus.plexus:plexus-utils=org.codehaus.plexus:plexus-utils:jar:1.5.1:runtime,
 
org.apache.maven.surefire:surefire-api=org.apache.maven.surefire:surefire-api:jar:2.4.3:runtime,
 
org.apache.maven:maven-artifact=org.apache.maven:maven-artifact:jar:2.0.6:runtime,
 
org.apache.maven:maven-plugin-api=org.apache.maven:maven-plugin-api:jar:2.0.6:runtime,
 
org.apache.maven.surefire:surefire-booter=org.apache.maven.surefire:surefire-booter:jar:2.4.3:runtime}
[DEBUG]   (f) printSummary = true
[DEBUG]   (f) project = MavenProject: 
jamie.test.ba.testing:sub-sub-process:0.0.1-SNAPSHOT @ 
C:\Sonic\SDPTools\workspace\sub-sub-process\pom.xml
[DEBUG]   (f) projectArtifactMap = 
{com.progress.sonic.utilities:zipped-domain=com.progress.sonic.utilities:zipped-domain:jar:7.6.2-SNAPSHOT:test,
 
com.progress.sonic.mq:sonic_XMessage=com.progress.sonic.mq:sonic_XMessage:jar:7.6.1:test,
 sonic-mq:sonic_Client=sonic-mq:sonic_Client:jar:7.6.0:test, 
com.progress.sonic.mq:sonic_Crypto=com.progress.sonic.mq:sonic_Crypto:jar:7.6.1:test,
 
com.progress.sonic.mq:sonic_Client=com.progress.sonic.mq:sonic_Client:jar:7.6.1:compile,
 
com.ba.sip.test.jms:jmsservicetester=com.ba.sip.test.jms:jmsservicetester:jar:1.0.2-SNAPSHOT:compile,
 junit:junit=junit:junit:jar:4.6:test, 
com.ba.sip.messaging.esbx.services:MultiPartsRemoval=com.ba.sip.messaging.esbx.services:MultiPartsRemoval:esbstyp:0.0.1-SNAPSHOT:compile,
 
commons-logging:commons-logging=commons-logging:commons-logging:jar:1.1.1:compile,
 javax.jms:jms=javax.jms:jms:jar:1.1:compile}
[DEBUG]   (f) redirectTestOutputToFile = false
[DEBUG]   (f) remoteRepositories = [[internal-mirror] -> 
https://www.soa-knowledge.org/nexus/content/groups/internal-mirror, [central] 
-> http://repo1.maven.org/maven2]
[DEBUG]   (f) reportFormat = xml
[DEBUG]   (f) reportsDirectory = 
C:\Sonic\SDPTools\workspace\sub-sub-process\target\surefire-reports
[DEBUG]   (f) session = org.apache.maven.execution.mavensess...@1de4dd8
[DEBUG]   (f) testClassesDirectory = 
C:\Sonic\SDPTools\workspace\sub-sub-process\target\test-classes
[DEBUG]   (f) testNGArtifactName = org.testng:testng
[DEBUG]   (f) testSourceDirectory = 
C:\Sonic\SDPTools\workspace\sub-sub-process\src\test\java
[DEBUG]   (f) trimStackTrace = true
[DEBUG]   (f) useFile = true
[DEBUG]   (f) useManifestOnlyJar = true
[DEBUG]   (f) workingDirectory = C:\Sonic\SDPTools\workspace\sub-sub-process
[DEBUG] -- end configuration --
[INFO] [surefire:test]
[DEBUG] dummy:dummy:jar:1.0 (selected for null)
[DEBUG]   org.apache.maven.surefire:surefire-booter:jar:2.4.3:runtime (selected 
for runtime)
[DEBUG]     org.apache.maven.surefire:surefire-api:jar:2.4.3:runtime (selected 
for runtime)
[DEBUG] Adding to surefire booter test classpath: C:\Documents and 
Settings\kjervis\.m2\repository\org\apache\maven\surefire\surefire-booter\2.4.3\surefire-booter-2.4.3.jar
[DEBUG] Adding to surefire booter test classpath: C:\Documents and 
Settings\kjervis\.m2\repository\org\apache\maven\surefire\surefire-api\2.4.3\surefire-api-2.4.3.jar
[DEBUG] dummy:dummy:jar:1.0 (selected for null)
[DEBUG] Retrieving parent-POM: 
org.apache.maven.surefire:surefire-providers::2.4.3 for project: 
null:surefire-junit4:jar:null from the repository.
[DEBUG] Adding managed dependencies for unknown:surefire-junit4
[DEBUG]   org.apache.maven.surefire:surefire-api:jar:2.4.3
[DEBUG]   org.apache.maven.surefire:surefire-booter:jar:2.4.3
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.5.1
[DEBUG]   org.apache.maven.surefire:surefire-junit4:jar:2.4.3:test (selected 
for test)
[DEBUG]     junit:junit:jar:4.0:test (selected for test)
[DEBUG]     org.apache.maven.surefire:surefire-api:jar:2.4.3:test (selected for 
test)
[DEBUG] Adding to surefire test classpath: C:\Documents and 
Settings\kjervis\.m2\repository\org\apache\maven\surefire\surefire-junit4\2.4.3\surefire-junit4-2.4.3.jar
[DEBUG] Adding to surefire test classpath: C:\Documents and 
Settings\kjervis\.m2\repository\junit\junit\4.0\junit-4.0.jar
[DEBUG] Adding to surefire test classpath: C:\Documents and 
Settings\kjervis\.m2\repository\org\apache\maven\surefire\surefire-api\2.4.3\surefire-api-2.4.3.jar
[DEBUG] Test Classpath :
[DEBUG]   C:\Sonic\SDPTools\workspace\sub-sub-process\target\test-classes
[DEBUG]   C:\Sonic\SDPTools\workspace\sub-sub-process\target\classes
[DEBUG]   C:\Documents and 
Settings\kjervis\.m2\repository\junit\junit\4.6\junit-4.6.jar
[DEBUG]   C:\Documents and 
Settings\kjervis\.m2\repository\com\ba\sip\test\jms\jmsservicetester\1.0.2-SNAPSHOT\jmsservicetester-1.0.2-SNAPSHOT.jar
[DEBUG]   C:\Documents and 
Settings\kjervis\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar
[DEBUG]   C:\Documents and 
Settings\kjervis\.m2\repository\javax\jms\jms\1.1\jms-1.1.jar
[DEBUG]   C:\Documents and 
Settings\kjervis\.m2\repository\com\progress\sonic\mq\sonic_Client\7.6.1\sonic_Client-7.6.1.jar
[DEBUG]   C:\Documents and 
Settings\kjervis\.m2\repository\sonic-mq\sonic_Client\7.6.0\sonic_Client-7.6.0.jar
[DEBUG]   C:\Documents and 
Settings\kjervis\.m2\repository\com\progress\sonic\mq\sonic_Crypto\7.6.1\sonic_Crypto-7.6.1.jar
[DEBUG]   C:\Documents and 
Settings\kjervis\.m2\repository\com\progress\sonic\mq\sonic_XMessage\7.6.1\sonic_XMessage-7.6.1.jar
[DEBUG]   C:\Documents and 
Settings\kjervis\.m2\repository\com\progress\sonic\utilities\zipped-domain\7.6.2-SNAPSHOT\zipped-domain-7.6.2-SNAPSHOT.jar
[DEBUG] Setting system property 
[user.dir]=[C:\Sonic\SDPTools\workspace\sub-sub-process]
[DEBUG] Setting system property [localRepository]=[C:\Documents and 
Settings\kjervis\.m2\repository]
[DEBUG] Setting system property 
[basedir]=[C:\Sonic\SDPTools\workspace\sub-sub-process]
[DEBUG] Using JVM: C:\Sonic\SDPTools\jdk1.5.0_16\jre\bin\java
[INFO] Surefire report directory: 
C:\Sonic\SDPTools\workspace\sub-sub-process\target\surefire-reports
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating properties files for forking; nested exception is 
java.io.IOException: The system cannot find the path specified

[INFO] ------------------------------------------------------------------------
[DEBUG] 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(DefaultLifecycleExecutor.java:583)
        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:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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.java:541)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.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.java: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(SurefireBooter.java:523)
        at 
org.apache.maven.surefire.booter.SurefireBooter.fork(SurefireBooter.java:621)
        ... 22 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 
[INFO] Finished at: Wed Feb 03 12:55:12 GMT 2010
[INFO] Final Memory: 25M/45M
[INFO] ------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to