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

Robert Scholte commented on SUREFIRE-1563:
------------------------------------------

Ah, so then you'll have multiple execution blocks for maven-surefire-plugin, 
all with their own set of additional modules (or none).
Simone is the first one hitting this issue, but I expect we'll get more (a lot 
more) of it. We should really improve this, either with logging like: {{[INFO] 
added static modules: x, y, z}} and/or better  handling of the 
{{NoClassDefFoundError}}. It is actually a shame that the JRE cannot provide 
such warning. It is aware of the jar since it is on the modulepath, but it 
isn't used.

> 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
(v7.6.3#76005)

Reply via email to