apache / apache/maven-dependency-plugin
[MDEP-973] Make it possible to not fail on 'unneeded forced usage'
- Dominant language
- Java
- Stars
- 175
- Forks
- 196
- Avg merge
- 19h 30m
- Merged PRs (30d)
- 5
Description
**[Hans Aikema](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=aikebah)** opened **[MDEP-973](https://issues.apache.org/jira/browse/MDEP-973?redirect=false)** and commented
Currently the analyze-report goals makes the build fail when there is a usedDependency defined for a dependency that in past was only used at test-runtime, but due to new development has transitioned to visible use to the plugin.
This was uncovered looking into https://github.com/jeremylong/DependencyCheck/issues/7362
analyze-report fails with error
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.21.0:site (default-site) on project dependency-check-core: Error generating maven-dependency-plugin:3.8.1:analyze-report report: Cannot analyze dependencies: Trying to force use of dependencies which are declared but already detected as used: [ch.qos.logback:logback-classic] -> [Help 1]
As we started using logback classes directly in testcode, whereas previously logback-classic was merely the log-implementation that happened to be configured and used at runtime in tests.
In my view such a case should not yield an error causing build failure, but a warning that an unneeded force-usage is configured.
---
No further details from [MDEP-973](https://issues.apache.org/jira/browse/MDEP-973?redirect=false)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the maven-dependency-plugin analyze-report goal and reproduce the reported failure involving a forced dependency already detected as used, using the dependency-check-core example if available. Done means this condition no longer fails the build and instead produces a warning; the payload names no source files or tests to inspect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100