[ https://issues.apache.org/jira/browse/SUREFIRE-1262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15431152#comment-15431152 ]
Robert Scholte commented on SUREFIRE-1262: ------------------------------------------ Toolchain doesn't detect the java version, it simply picks the one selected. In case of non-fork I would check the existence of [java.lang.reflect.Module|http://cr.openjdk.java.net/~mr/jigsaw/spec/api/java/lang/reflect/Module.html]. For forked you need to call {{java -version}} and read the first line, analyze its value based on http://openjdk.java.net/jeps/223 > Add modulepath support > ---------------------- > > Key: SUREFIRE-1262 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1262 > Project: Maven Surefire > Issue Type: Improvement > Reporter: Robert Scholte > Assignee: Tibor Digana > Fix For: 2.19.2 > > > With the Jigsaw project Java9 is extended with a modulepath. This means that > surefire should be executed in a different way. > When working with a modulepath, the Classpath in the MANIFEST of the > executable jar will be ignored, you need need to add everything on > commandline. > Just like javadoc, the java executable has an {{@<file>}} option, where you > can add arguments per line. So this is the new preferred way to build the > module-path. > IIUC for surefire it is important to add {{-Xpatch target/test-classes}} > which makes it possible to use the same packages as target/classes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)