[
https://issues.apache.org/jira/browse/MDEP-791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17494952#comment-17494952
]
Tamás Cservenák commented on MDEP-791:
--------------------------------------
Sorry, am talking about release dependencies used in reproducible way (no
ranges), as then
* "D1 does not depend on D2 at the moment" – Fine, releases are immutable.
* "after that D1 make a fix and D1 now depends on D2" – I believe this D1 and
D1 above have different versions then? How does it affects P? This will become
issue once P upgrades to new D1 version, but the P can also adapt and remove D2
from test scope.
* "replace D1 with C1" – this is again something I don't understand: we are
here in this situation exactly as D1 declares dependency on D2, How come now C1
come into picture, along with the fact that you still need D2? Also, if C1
depens on C2, why would your test be written against D2 and not C2? Finally,
this again means P can adapt (as it changes dep D1 to C1), and return the D2
into test scope, no?
Could you maybe point me at real life examples?
> 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)