Hans Aikema created MDEP-973:
--------------------------------

             Summary: Make it possible to not fail on 'unneeded forced usage'
                 Key: MDEP-973
                 URL: https://issues.apache.org/jira/browse/MDEP-973
             Project: Maven Dependency Plugin
          Issue Type: Improvement
          Components: analyze, analyze-report
            Reporter: Hans Aikema


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
{quote}[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]
{quote}
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.



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

Reply via email to