[ 
https://issues.apache.org/jira/browse/SUREFIRE-1403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16288995#comment-16288995
 ] 

Jan Bartel commented on SUREFIRE-1403:
--------------------------------------

The solution to add java.se.ee to the surefire command line is not a good idea 
IMHO. The java.se.ee module is scheduled for removal from the jdk. Moreover it 
does not contain all necessary ee classes (for example it only contains a 
couple of javax.transaction exception classes and not the whole 
javax.transaction package). The latter causes problems if you're trying to unit 
test with a jdk 1.9 jvm - because surefire puts the java.se.ee module onto the 
modulepath it ignores any other jars on the classpath that actually have the 
full javax.transaction package in it and you get class does not exist 
exceptions. I've had to back down to surefire 2.20 because of this problem in 
some of the jetty unit tests.

See http://openjdk.java.net/jeps/320 for info on the java.se.ee debacle.

> [Jigsaw] [Java 9] add "--add-modules java.se.ee" to forked CLI argument
> -----------------------------------------------------------------------
>
>                 Key: SUREFIRE-1403
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1403
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Failsafe Plugin, Maven Surefire Plugin
>            Reporter: Tibor Digana
>            Assignee: Tibor Digana
>             Fix For: 2.20.1
>
>         Attachments: surefire-1403.zip
>
>
> Calling *findClass( cls, "java.se.ee")* in *IsolatedClassLoader* does not 
> help and does not do anything because the module is ignored in Java 9.
> In-plugin provider does not have any problem to load classes from entire JDK.
> Forked JVM would work only after added
> {{<argLine>--add-modules java.se.ee</argLine>}}
> The fix would be to add "--add-modules java.se.ee" if {{--add-modules}} is 
> not specified by user at Java 9+.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to