maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Bartel (JIRA)" <>
Subject [jira] [Commented] (SUREFIRE-1403) [Jigsaw] [Java 9] add "--add-modules" to forked CLI argument
Date Wed, 13 Dec 2017 09:51:00 GMT


Jan Bartel commented on SUREFIRE-1403:

The solution to add to the surefire command line is not a good idea IMHO. The
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 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 for info on the debacle.

> [Jigsaw] [Java 9] add "--add-modules" to forked CLI argument
> -----------------------------------------------------------------------
>                 Key: SUREFIRE-1403
>                 URL:
>             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:
> Calling *findClass( cls, "")* 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</argLine>}}
> The fix would be to add "--add-modules" if {{--add-modules}} is not specified
by user at Java 9+.

This message was sent by Atlassian JIRA

View raw message