You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (Jira)" <ji...@apache.org> on 2019/12/01 10:53:00 UTC
[jira] [Commented] (SUREFIRE-1563) NoClassDefFoundError for JPMS
modules with "require static"
[ https://issues.apache.org/jira/browse/SUREFIRE-1563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16985525#comment-16985525 ]
Robert Scholte commented on SUREFIRE-1563:
------------------------------------------
assuming you're talking about runtime, in case of static modules you will always need to explicitly name them.
During compile-time you will always need the direct static modules.
ResolvePathsRequest it not aware of the difference between compile and runtime (yet), once somebody has a failing usecase we can work on it.
You won't get a special getter for static modules, ResolvePathsResult gives all the modules so it is up to you to filter out the static ones.
> 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)