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

Henning Schmiedehausen commented on MDEP-757:
---------------------------------------------

you are most likely correct but you need to convince the maintainers of the 
plugin and the dependency analyzer library that they are not which in my 
experience is an uphill battle. 

Setting the ignoreAllNonTestScoped flag and moving on with life was my answer 
to that.

> bug with "non-test scoped test only dependencies found"
> -------------------------------------------------------
>
>                 Key: MDEP-757
>                 URL: https://issues.apache.org/jira/browse/MDEP-757
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: analyze
>    Affects Versions: 3.2.0
>         Environment: mvn --version
> Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
> Maven home: /usr/local/Cellar/maven/3.8.1/libexec
> Java version: 11.0.11, vendor: AdoptOpenJDK, runtime: 
> /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "11.4", arch: "x86_64", family: "mac"
>            Reporter: Henning Schmiedehausen
>            Assignee: Henning Schmiedehausen
>            Priority: Major
>         Attachments: MDEP-757-reproducer-2-rec.zip
>
>
> Starting with 3.2.0, I see this problem in one of my project modules:
> {noformat}
> [INFO] --- maven-dependency-plugin:3.2.0:analyze-only (basepom.default) @ 
> foundation ---
> [WARNING] Non-test scoped test only dependencies found:
> [WARNING] com.fasterxml.jackson.core:jackson-databind:jar:2.12.2:compile
> {noformat}
> This is not correct:
> {noformat}
> % cd lib/foundation
> % grep -r databind src/main
> src/main/java/dev/data/DataSet.java:import 
> com.fasterxml.jackson.databind.annotation.JsonDeserialize;
> src/main/java/dev/data/DataSet.java:import 
> com.fasterxml.jackson.databind.annotation.JsonSerialize;
> src/main/java/dev/data/WriteableLocator.java:import 
> com.fasterxml.jackson.databind.annotation.JsonSerialize;
> src/main/java/dev/data/ObjectMetadata.java:import 
> com.fasterxml.jackson.databind.annotation.JsonDeserialize;
> src/main/java/dev/data/ObjectMetadata.java:import 
> com.fasterxml.jackson.databind.annotation.JsonSerialize;
> src/main/java/dev/data/DataDefinition.java:import 
> com.fasterxml.jackson.databind.annotation.JsonSerialize;
> src/main/java/dev/data/ObjectAttribute.java:import 
> com.fasterxml.jackson.databind.annotation.JsonDeserialize;
> src/main/java/dev/data/ObjectAttribute.java:import 
> com.fasterxml.jackson.databind.annotation.JsonSerialize;
> src/main/java/dev/data/ObjectDefinition.java:import 
> com.fasterxml.jackson.databind.annotation.JsonDeserialize;
> src/main/java/dev/data/ObjectDefinition.java:import 
> com.fasterxml.jackson.databind.annotation.JsonSerialize;
> src/main/java/dev/data/ImmutableDataObject.java:import 
> com.fasterxml.jackson.databind.annotation.JsonSerialize;
> {noformat}
> So this dependency is used all over the place in the main sources (which is 
> why it can not be in test scope). However, the plugin no longer (it did in 
> 3.1.2) recognize it (all the uses are just annotations, so I guess that is 
> the problem) and raises this error.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to