Henning Schmiedehausen created SUREFIRE-2190:
------------------------------------------------

             Summary: optional dependencies and JPMS modules confuse surefire
                 Key: SUREFIRE-2190
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2190
             Project: Maven Surefire
          Issue Type: Bug
          Components: JUnit 5.x support, Maven Surefire Plugin
    Affects Versions: 3.1.2
            Reporter: Henning Schmiedehausen


The surefire plugin, when executing tests for JPMS code, patches the test code 
"into" the module under test (using {{--patch-module}}). This work for 
compile+runtime dependencies (`requires`) but not for compile required/runtime 
optional dependencies ({{requires static}}).

The plugin only adds the module under test using {{--module 
module.under.test.id}} to the JVM that is executing the test classes. As 
{{requires static}} dependencies are not loaded transitively, any dependency 
that is optional for the main artifact but required for test code is not found. 




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to