You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2023/05/16 20:04:00 UTC
[jira] [Updated] (MSHARED-1255) Do something about Hamcrest
[ https://issues.apache.org/jira/browse/MSHARED-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Elliotte Rusty Harold updated MSHARED-1255:
-------------------------------------------
Description:
Currently there's a weird situation with Hamcrest deps that the dependency analyzer doesn't truly grok and which leads to false positive warnings like:
[WARNING] Unused declared dependencies found:
[WARNING] org.hamcrest:hamcrest-core:jar:2.2:test
This happens in maven-shared-utils for intance.
This is a result of moving classes between artifacts from version 1 to 2, and appears when JUnit 4 is used and thus an older version of hamcrest-core gets pulled in unless the empty org.hamcrest:hamcrest-core:jar:2.2 is added:
https://hamcrest.org/JavaHamcrest/distributables
Options:
1. special case this one
2. Notice when a dependency appears unused but does upgrade a version lower in the tree
3. use dependency management instead to upgrade hamcrest-core?
was:
Currently there's a weird situation with Hamcrest deps that the dependency analyzer doesn't truly grok and which leads to false positive warnings like:
[WARNING] Unused declared dependencies found:
[WARNING] org.hamcrest:hamcrest-core:jar:2.2:test
This is a result of moving classes between artifacts from version 1 to 2, and appears when JUnit 4 is used and thus an older version of hamcrest-core gets pulled in unless the empty org.hamcrest:hamcrest-core:jar:2.2 is added:
https://hamcrest.org/JavaHamcrest/distributables
Options:
1. special case this one
2. Notice when a dependency appears unused but does upgrade a version lower in the tree
3. use dependency management instead to upgrade hamcrest-core?
> Do something about Hamcrest
> ---------------------------
>
> Key: MSHARED-1255
> URL: https://issues.apache.org/jira/browse/MSHARED-1255
> Project: Maven Shared Components
> Issue Type: Bug
> Components: maven-dependency-analyzer
> Reporter: Elliotte Rusty Harold
> Priority: Major
>
> Currently there's a weird situation with Hamcrest deps that the dependency analyzer doesn't truly grok and which leads to false positive warnings like:
> [WARNING] Unused declared dependencies found:
> [WARNING] org.hamcrest:hamcrest-core:jar:2.2:test
> This happens in maven-shared-utils for intance.
> This is a result of moving classes between artifacts from version 1 to 2, and appears when JUnit 4 is used and thus an older version of hamcrest-core gets pulled in unless the empty org.hamcrest:hamcrest-core:jar:2.2 is added:
> https://hamcrest.org/JavaHamcrest/distributables
> Options:
> 1. special case this one
> 2. Notice when a dependency appears unused but does upgrade a version lower in the tree
> 3. use dependency management instead to upgrade hamcrest-core?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)