maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SUREFIRE-1563) NoClassDefFoundError for JPMS modules with "require static"
Date Fri, 01 May 2020 19:03:00 GMT

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

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

Option 1 is clear, assuming the tests have a different package and the module has a different
name. So no patching required.
Option 3 is possible, [~olamy] recently added via https://github.com/codehaus-plexus/plexus-languages/commit/15031cc226516d0fa30a43aa38d8159e6e2e9115
the property `includeStatic`

I have my doubts about option 2. The fact that you use a module descriptor will imply you
need to copy everything from the main module descriptor. Instead I would stick to additional
arguments.

> 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.3.4#803005)

Mime
View raw message