[ https://issues.apache.org/jira/browse/MDEP-791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17494854#comment-17494854 ]
Elliotte Rusty Harold commented on MDEP-791: -------------------------------------------- I am frankly astonished that Maven 3.x works like this, and frankly so surprised that I'm going to have to verify that for myself before I really believe it. I will be even more astonished if this proves to be a deliberate, documented choice of how the Maven resolution should work. Unless that can be demonstrated (and I really hope it can't) then I think this is a serious bug that needs to be fixed in Maven 3.x, not something we should live with. As a much less important side issue, I do not yet see any bug in the dependency plugin and analyzer and don't think we should spend time here to bless this broken behavior. It is of course possible that there's more information here I don't have yet, and that I'm misunderstanding the real concern. Maybe there's something especially weird about Jackson that trips over issues most projects don't have, perhaps involving reflection. That would be a much less surprising fact to discover. It certainly wouldn't be the first time Jackson's gone off the deep end. However I am not willing to accept that the description given here of the Maven resolution algorithm makes sense or was intentional without a lot stronger evidence. > 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)