[
https://issues.apache.org/jira/browse/MDEP-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17427088#comment-17427088
]
Tommy Andersen commented on MDEP-773:
-------------------------------------
We have seen that on a project as well, where a dependency was used in both
test and compile scope. But wrongfully identified as a test-only dependency.
The problem is that earlier versions of the maven dependency plugin does not
seem to support Java 17, and since we treat dependency warnings as errors, we
are unable to compile with Java 17 until this has been fixed. Is there no
property to disable this check?
> Getting Warning : Non-test scoped test only dependencies found
> --------------------------------------------------------------
>
> Key: MDEP-773
> URL: https://issues.apache.org/jira/browse/MDEP-773
> Project: Maven Dependency Plugin
> Issue Type: Bug
> Components: analyze
> Affects Versions: 3.2.0
> Environment: Windows 10
> Reporter: Venkata Ramana Gujja
> Priority: Critical
> Attachments: demo.zip
>
>
> I am getting below warning even after I have declared the dependency in
> pom.xml. I am executing the command mvn dependency:analyze. I am using
> @Autowired Java class from spring beans in a JUnit test.
> [WARNING] Non-test scoped test only dependencies found:
> [WARNING] org.springframework:spring-beans:jar:5.3.10:compile
>
> I have declared below dependency in pom.xml
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-beans</artifactId>
> <version>5.3.10</version>
> </dependency>
>
> I have attached demo maven project.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)