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

Slawomir Jaranowski commented on MDEP-791:
------------------------------------------

Dependency tree for test project:

{code}
mvn dependency:tree -Dverbose -P core-test

[INFO] --- maven-dependency-plugin:3.3.0-SNAPSHOT:tree (default-cli) @ tstp ---
[INFO] mdep753:tstp:jar:0.1-SNAPSHOT
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.13.1:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.13.1:compile
[INFO] |  \- (com.fasterxml.jackson.core:jackson-core:jar:2.13.1:compile - 
omitted for duplicate)
[INFO] +- org.junit.jupiter:junit-jupiter-api:jar:5.8.2:test
[INFO] |  +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] |  +- org.junit.platform:junit-platform-commons:jar:1.8.2:test
[INFO] |  |  \- (org.apiguardian:apiguardian-api:jar:1.1.2:test - omitted for 
duplicate)
[INFO] |  \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] \- com.fasterxml.jackson.core:jackson-core:jar:2.13.1:test (scope not 
updated to compile)
{code}

is it also wrong?

> Non-test scoped and transitive dependencies in compile scope
> ------------------------------------------------------------
>
>                 Key: MDEP-791
>                 URL: https://issues.apache.org/jira/browse/MDEP-791
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 3.2.0, 3.3.0
>            Reporter: Slawomir Jaranowski
>            Priority: Critical
>         Attachments: MDEP-791.zip
>
>
> When we use some dependency in test classes which is not used in production 
> code but is required as transitive dependency for other used in production 
> code - such dependency should not be included in {*}{{Non-test scoped}}{*}.
> Example:
>  * test code use {{ObjectCodec}} from {{jackson-core}}
>  * production code use only {{ObjectMapper}} from {{jackson-databind}}
>  * production code don't use any classes from {{jackson-core}}
> {{jackson-core}} is needed by {{jackson-databind}} and must by in compile 
> scope so should not be reported as {{Non-test scoped}}
>  



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

Reply via email to