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

Elliotte Rusty Harold edited comment on MDEP-791 at 2/15/22, 8:39 PM:
----------------------------------------------------------------------

Thanks for the clear description. This is working as intended and designed. In 
the case cited jackson-databind should declare a dependency on jackson-core. 
Your pom.xml should only declare a test scoped dependency. That is, only 
declare the direct dependencies in each scope. Do not declare transitive 
dependencies. 


was (Author: elharo):
Tanks for the clear description. This is working as intended and designed. In 
the case cited jackson-databind should declare a dependency on jackson-core. 
Your pom.xml should only declare a test scoped dependency. That is, only 
declare the direct dependencies in each scope. Do not declare transitive 
dependencies. 

> 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
>            Reporter: Slawomir Jaranowski
>            Priority: Critical
>
> 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