slachiewicz commented on issue #1535:
URL: 
https://github.com/apache/maven-dependency-plugin/issues/1535#issuecomment-6153268813

   The analyzer is right here: the test code uses classes from 
`org.hamcrest:hamcrest`, and `hamcrest-core:2.2` contributes only the marker 
class `HamcrestCoreIsDeprecated`. Declare what the code uses and keep the pin 
out of `<dependencies>`. With JUnit 4.13.2 and a test using 
`MatcherAssert`/`CoreMatchers`, on 3.12.0-SNAPSHOT:
   
   - `hamcrest-core:2.2` in `<dependencies>`: used undeclared `hamcrest:2.2`, 
unused declared `hamcrest-core:2.2`
   - nothing declared: used undeclared `hamcrest-core:1.3` (from JUnit)
   - `hamcrest:2.2` in `<dependencies>` and `hamcrest-core:2.2` in 
`<dependencyManagement>`: no problems found
   - `hamcrest:2.2` in `<dependencies>` and `hamcrest-core` excluded from 
`junit`: no problems found
   
   apache/maven-dependency-analyzer#251 was closed with the same finding.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to