[ https://issues.apache.org/jira/browse/MDEP-753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17491365#comment-17491365 ]
Thorsten Glaser commented on MDEP-753: -------------------------------------- I’ve isolated the problem with Jackson reported by [~chonton] in an MWE: [^tj.zip] {quote}{{$ mvn dependency:analyze-only}} {{[INFO] Scanning for projects...}} {{[INFO] }} {{[INFO] ----------------------------< mdep753:tstp >----------------------------}} {{[INFO] Building tstp 0.1-SNAPSHOT}} {{[INFO] --------------------------------[ jar ]---------------------------------}} {{[INFO] }} {{[INFO] --- maven-dependency-plugin:3.3.0-SNAPSHOT:analyze-only (default-cli) @ tstp ---}} {{[WARNING] Non-test scoped test only dependencies found:}} {{[WARNING] com.fasterxml.jackson.core:jackson-core:jar:2.13.1:compile}} {{[INFO] ------------------------------------------------------------------------}} {{[INFO] BUILD SUCCESS}} {{[INFO] ------------------------------------------------------------------------}} {{[INFO] Total time: 3.260 s}} {{[INFO] Finished at: 2022-02-12T16:16:52+01:00}} {{[INFO] ------------------------------------------------------------------------}} {quote} Running just {{mvn clean test}} will work. It does indeed seem like the “is this used outside of tests?” check does not take inheritance across Maven modules into account. > Non-test dependency reported as Non-test scoped test only dependency > -------------------------------------------------------------------- > > Key: MDEP-753 > URL: https://issues.apache.org/jira/browse/MDEP-753 > Project: Maven Dependency Plugin > Issue Type: Bug > Components: analyze > Affects Versions: 3.2.0 > Reporter: Elliotte Rusty Harold > Assignee: Elliotte Rusty Harold > Priority: Critical > Fix For: 3.3.0 > > Attachments: tj.zip > > > Saw this when updating the google-http-java-client from 3.1.2 to 3.2.0 of the > plugin. I'm not immediately sure whether this is a regression: > [INFO] --- maven-dependency-plugin:3.2.0:analyze (default-cli) @ > google-http-client --- > Warning: Non-test scoped test only dependencies found: > Warning: com.google.guava:guava:jar:30.1.1-android:compile > Warning: io.opencensus:opencensus-api:jar:0.28.0:compile > Changing Guava to scope test breaks the build, which is expected based on the > code. The warning seems incorrect. > https://github.com/googleapis/google-http-java-client/pull/1396 > https://github.com/googleapis/google-http-java-client/pull/1396/checks?check_run_id=2809438131 -- This message was sent by Atlassian Jira (v8.20.1#820001)