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

Christian Stein commented on SUREFIRE-1563:
-------------------------------------------

All these tiny, but potentially many, details can be covered by a (n almost) 
perfect solution: a test module descriptor! Here you have a compiler-controlled 
syntax, you have totally controll over what is opened to whom, may state your 
requirement of testing frameworks by the module names, and don't have to learn 
the command line options from javac and java by heart. A test module 
descriptors does exactly this for you: wraps the needed Java module system 
configuration in a 1-class Java compilation unit. The `module-info.java` file.  
;)

It'd be sooo cool, if "Java" supported a `module-test.java` unit that a) 
extends the `module-info.java` file and b) only holds the extra bits required 
for testing: like `requires junit;` and the like.

I invite you all to discuss this topic at 
https://github.com/sormuras/junit-platform-maven-plugin/issues/4

> 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