[ https://issues.apache.org/jira/browse/SUREFIRE-1563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16985431#comment-16985431 ]
Tibor Digana commented on SUREFIRE-1563: ---------------------------------------- [~scolebourne] [~scolebou...@joda.org] We can continue our discussion here. [~olamy] [~rfscholte] You want to release {{plexus-java}} with the commits {{Indirect static required modules should stay on classpath}}. That's fine but I want to clarify the way how the modulepath and the classpath is managed by this library. Is there any true/false switch to control {{static Java modules}} if i want them or not? Additionally, i want to have some getter of these {{static Java modules}}. It is important for Surefire to have it under control from the API calls perspectives. Then there can be 3 ClassLoaders referenced in a chain and the modules from {{requires static}} would be in the last CL (belongs to main dependencies). Then the {{slf4j-api}} in test dependencies CL would override {{slf4j-api}} from main CL. The modulepath would be properly deterministic. > NoClassDefFoundError for JPMS modules with "require static" > ----------------------------------------------------------- > > Key: SUREFIRE-1563 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1563 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin > Affects Versions: 2.22.0 > Reporter: Simone Bordet > Priority: Major > Attachments: maven-jpms.tgz > > > When a Maven module has a {{module-info.java}} that contains a {{requires > static}}, Surefire throws {{NoClassDefFoundError}} when running the tests for > that Maven module. > If the dependency is declared only as {{required}} (no {{static}}), then the > tests run fine. > Attached a reproducible project. -- This message was sent by Atlassian Jira (v8.3.4#803005)