[
https://issues.apache.org/jira/browse/SUREFIRE-1563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16596711#comment-16596711
]
Christian Stein commented on SUREFIRE-1563:
-------------------------------------------
Will give the Surefire configuration a shot, soon.
Regarding _"a module that is declared in the module-path"_: it is not declared,
it is added as an element on the path for potential resolution – but if no
other modules requires it, it is not resolved. This is one main difference to
the class-path. And a good one, imho.
Here are some more details on the topic:
https://blog.codefx.org/java/module-system-optional-dependencies/
> 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)