Unable to run tests using a different JVM unless using forkMode="once" (always 
and pertest do not work)
-------------------------------------------------------------------------------------------------------

                 Key: SUREFIRE-602
                 URL: http://jira.codehaus.org/browse/SUREFIRE-602
             Project: Maven Surefire
          Issue Type: Bug
          Components: process forking
    Affects Versions: 2.4.3
         Environment: Maven version: 2.0.10
Java version: 1.5.0_08
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
            Reporter: Richard Chamberlain


Hi,

Our build farm uses java 1.5.0_08. We have written some code in java 6. We can 
get it to compile in java 6, but running tests wasn't that easy. We originally 
set the config to:
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.4.3</version>
        <configuration>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
          <jvm>D:\buildTools\jdk\1.6.0\bin\java.exe</jvm>
          <forkMode>pertest</forkMode>
          <includes>
            <include>**/*Behavior.java</include>
          </includes>
        </configuration>
      </plugin>

But this didn't work reporting a bad version in class file error. When we set 
forkMode to "once", it worked. 

After further investigation
- the jvm property is only picked up when forkMode is "once"
- it does not work when forkmode is "pertest" or "always"

This was extremely painful to work out what the bug was. Can I also suggest 
that you print out the JVM version and any parameters in the debug (mvn -X) 
output?

Thanks,

Richard





-- 
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

        

Reply via email to