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

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

Not sure what the status is, and what you expect here:
{{<configuration>}}
{{  <argLine>--add-modules=org.slf4j</argLine>}}
{{</configuration>}}
This works, not sure if it is enough

The rational: By default all static required modules are not added to the 
runtime, as they are optional. The developer needs to decide how to execute 
these tests: without these or with one or more optional(static) modules.


> 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
>            Assignee: Olivier Lamy
>            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.20.10#820010)

Reply via email to