Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.0-M6
-
None
-
None
Description
On projects using toolchains submodules can be compiled with a different Java version than the main project. This can result in an UnsupportedClassVersionError if the class scan is performed by the main Maven JVM:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (test) on project log4j-api-java9: Execution test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: java.lang.UnsupportedClassVersionError: org/apache/logging/log4j/util/java9/ProcessIdUtilTest has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 -> [Help 1]
Therefore Surefire should probably fork a new instance to scan for test classes whenever forkCount is not zero.
Attachments
Attachments
Issue Links
- is blocked by
-
SUREFIRE-2048 Reworking the hack in SUREFIRE-1535. Fork should received command declaring Java type of the test.
- Open
-
SUREFIRE-2049 Upgrade Surefire Provider interface
- Open