You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Richard Eckart de Castilho (Jira)" <ji...@apache.org> on 2023/03/20 15:37:00 UTC

[jira] [Updated] (MDEP-846) Source-only dependencies are not detected

     [ https://issues.apache.org/jira/browse/MDEP-846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Eckart de Castilho updated MDEP-846:
--------------------------------------------
    Component/s: analyze

> Source-only dependencies are not detected
> -----------------------------------------
>
>                 Key: MDEP-846
>                 URL: https://issues.apache.org/jira/browse/MDEP-846
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: analyze
>            Reporter: Richard Eckart de Castilho
>            Priority: Major
>
> If a class in the `src/main/java` part module A has a source-only dependency on a class in module B, the dependency dependency of A to B is not detected. This can lead to build failures if any class in the `src/main/test` part of module A also has dependencies on module B as the analyzer claims that the dependency of module B should be moved to the `test` scope. Doing so - however - then breaks the build.
> One such source-only dependency would be the import of a compile-time constant (e.g. static final String = "XXX") from a class in module B. Such constants are inlined into the class file produced for the class of module A. Thus, the compile-time dependency on module B cannot be determined by inspecting the class file using ASM.



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