You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tibor Digana (Jira)" <ji...@apache.org> on 2022/01/29 09:00:00 UTC

[jira] [Commented] (SUREFIRE-1993) Failsafe fails to detect module dependencies

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

Tibor Digana commented on SUREFIRE-1993:
----------------------------------------

Run the command
mv -X verify
and you will see the following for your analysis.


{noformat}
[DEBUG] Path to args file: C:\Users\tibor17\AppData\Local\Temp\surefire18235081086826102489\surefireargs13821900620996408063
[DEBUG] args file content:
--module-path
"C:\\Users\\tibor17\\reproducer\\application\\target\\application-1.jar;C:\\Users\\tibor17\\reproducer\\studentservice\\target\\studentservice-1.jar"
--class-path
"c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-booter\\3.0.0-M5\\surefire-booter-3.0.0-M5.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-api\\3.0.0-M5\\surefire-api-3.0.0-M5.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-logger-api\\3.0.0-M5\\surefire-logger-api-3.0.0-M5.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-shared-utils\\3.0.0-M4\\surefire-shared-utils-3.0.0-M4.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-extensions-spi\\3.0.0-M5\\surefire-extensions-spi-3.0.0-M5.jar;C:\\Users\\tibor17\\reproducer\\application\\target\\test-classes;C:\\Users\\tibor17\\reproducer\\studentservice-provider\\target\\studentservice-provider-1.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\jupiter\\junit-jupiter\\5.8.2\\junit-jupiter-5.8.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\jupiter\\junit-jupiter-api\\5.8.2\\junit-jupiter-api-5.8.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\opentest4j\\opentest4j\\1.2.0\\opentest4j-1.2.0.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\platform\\junit-platform-commons\\1.8.2\\junit-platform-commons-1.8.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apiguardian\\apiguardian-api\\1.1.2\\apiguardian-api-1.1.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\jupiter\\junit-jupiter-params\\5.8.2\\junit-jupiter-params-5.8.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\jupiter\\junit-jupiter-engine\\5.8.2\\junit-jupiter-engine-5.8.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\platform\\junit-platform-engine\\1.8.2\\junit-platform-engine-1.8.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\assertj\\assertj-core\\3.21.0\\assertj-core-3.21.0.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-junit-platform\\3.0.0-M5\\surefire-junit-platform-3.0.0-M5.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\common-java5\\3.0.0-M5\\common-java5-3.0.0-M5.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\platform\\junit-platform-launcher\\1.8.2\\junit-platform-launcher-1.8.2.jar"
--patch-module
application="C:\\Users\\tibor17\\reproducer\\application\\target\\test-classes"
--add-exports
application/org.apache.failsafe.its.serviceloader.application=ALL-UNNAMED
--add-modules
application
--add-reads
application=ALL-UNNAMED
org.apache.maven.surefire.booter.ForkedBooter
[DEBUG] Forking command line: cmd.exe /X /C ""C:\Program Files\Java\jdk-17.0.1\bin\java" --add-modules ALL-DEFAULT --add-opens application/org.apache.failsafe.its.serviceloader.application=ALL-UNNAMED @C:\Users\tibor17\AppData\Local\Temp\surefire18235081086826102489\surefireargs13821900620996408063 C:\Users\tibor17\AppData\Local\Temp\surefire18235081086826102489 2022-01-29T09-49-52_477-jvmRun1 surefire2344428537137764536tmp surefire_016549986728040054363tmp"
[DEBUG] Fork Channel [1] connected to the client.
[INFO] Running org.apache.failsafe.its.serviceloader.application.TrainingApplicationIT
{noformat}


> Failsafe fails to detect module dependencies
> --------------------------------------------
>
>                 Key: SUREFIRE-1993
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1993
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Failsafe Plugin
>    Affects Versions: 3.0.0-M5
>         Environment: Java 17
> Maven 4.0.0-alpha-SNAPSHOT and 3.8.4
>            Reporter: Maarten Mulders
>            Priority: Minor
>         Attachments: reproducer.zip
>
>
> Please see the attached project. It has three Maven modules, each defining its own JPMS module. The *application* module depends on an interface from the *studentservice* module, and the implementation for that interface lives in {*}studentservice-provider{*}. The {{module-info.java}} for the *studentservice-provider* module declares the implementation of that interface.
> When you run the application using {{{}./manually.sh{}}}, it correctly loads the *studentservice-provider* module. When you run the IT, it does not.
> The application prints the module path to standard out.
> From the test script it prints:
> {code:java}
> application/target/application-1.jar
> studentservice/target/studentservice-1.jar
> studentservice-provider/target/studentservice-provider-1.jar{code}
> From the integration test, which starts the same application, it prints:
> {code:java}
> application/target/application-1.jar
> studentservice/target/studentservice-1.jar{code}
>  
> Note how in the integration test the *studentservice-provider* is missing in the output.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)