[
https://issues.apache.org/jira/browse/MDEP-791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17494951#comment-17494951
]
Stanislav Spiridonov commented on MDEP-791:
-------------------------------------------
[~cstamas] - "All the other changes are wrong" - is not correct, at least the
first point.
Takes your example but imagines that D1 does not depend on D2 at the moment
when you start the P. So P must declare the D2 as a test dependency. After that
author of D1 make a fix and D1 now depends on D2. And it breaks your project P.
Another reason why P has to declare direct test dependency on D2 - you may
decide to replace the D1 dependency with C1 (make the same things as D1 but has
another implementation). And again without test dependency on D2, the project P
will be broken.
I am pretty sure that any changes in the project dependencies, that do not
break the contact/interface shouldn't influence your project setup.
> 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)