You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jean-Pierre Froud (JIRA)" <ji...@apache.org> on 2015/08/19 11:06:46 UTC
[jira] [Comment Edited] (MDEP-156) dependency:analyze mistakenly
reports an implemented interface as an unused, declared dependency
[ https://issues.apache.org/jira/browse/MDEP-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14702736#comment-14702736 ]
Jean-Pierre Froud edited comment on MDEP-156 at 8/19/15 9:06 AM:
-----------------------------------------------------------------
Quote from the dependency plugin documentation:
{quote}
By default, maven-dependency-analyzer is used to perform the analysis, with limitations due to the fact that it works at bytecode level, but any analyzer can be plugged in through analyzer parameter.
{quote}
If you only use constants from {{org.apache.avalon.excalibur.pool.Recyclable}} or if you only extend it, you'll face this limitation. You can use a different analyzer or you can use the parameter {{ignoredUnusedDeclaredDependencies}}:
||Name||Type||Since||Description||
|ignoredUnusedDeclaredDependencies|String[]|2.10|List of dependencies that will be ignored if they are declared but unused. The filter syntax is:
{noformat}[groupId]:[artifactId]:[type]:[version]{noformat}
where each pattern segment is optional and supports full and partial * wildcards. An empty pattern segment is treated as an implicit wildcard. *
For example, org.apache.* will match all artifacts whose group id starts with org.apache., and :::*-SNAPSHOT will match all snapshot artifacts.|
https://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html
was (Author: jpfroud):
Quote from the dependency plugin documentation:
{quote}
By default, maven-dependency-analyzer is used to perform the analysis, with limitations due to the fact that it works at bytecode level, but any analyzer can be plugged in through analyzer parameter.
{quote}
If you only use constants from {[org.apache.avalon.excalibur.pool.Recyclable}} or if you only extend it, you'll face this limitation. You can use a different analyzer or you can use the parameter {{ignoredUnusedDeclaredDependencies}}:
||Name||Type||Since||Description||
|ignoredUnusedDeclaredDependencies|String[]|2.10|List of dependencies that will be ignored if they are declared but unused. The filter syntax is:
{noformat}[groupId]:[artifactId]:[type]:[version]{noformat}
where each pattern segment is optional and supports full and partial * wildcards. An empty pattern segment is treated as an implicit wildcard. *
For example, org.apache.* will match all artifacts whose group id starts with org.apache., and :::*-SNAPSHOT will match all snapshot artifacts.|
https://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html
> dependency:analyze mistakenly reports an implemented interface as an unused, declared dependency
> ------------------------------------------------------------------------------------------------
>
> Key: MDEP-156
> URL: https://issues.apache.org/jira/browse/MDEP-156
> Project: Maven Dependency Plugin
> Issue Type: Bug
> Components: analyze
> Affects Versions: 2.0
> Reporter: Elliot Metsger
>
> When executing dependency:analyze on my project, analyze mistakenly identifies a compile time dependency as unused.
> When I remove the dependency from the POM, the compile fails. When I add it back in the compile succeeds.
> The POM in question is located at:
> http://dspace.svn.sourceforge.net/svnroot/dspace/branches/dspace-1_5_x/dspace-xmlui/dspace-xmlui-wing/pom.xml
> The artifact that is mistakenly identified as "declared but unused" is:
> {code:xml}<dependency>
> <groupId>org.dspace.xmlui.excalibur</groupId>
> <artifactId>excalibur-pool-api</artifactId>
> <version>2.1</version>
> </dependency>{code}
> The compile fails like so:
> /Users/esm/idea/workspace/dspace-1.5.x/dspace-xmlui/dspace-xmlui-wing/src/main/java/org/dspace/app/xmlui/wing/AbstractWingTransformer.java:[68,16] cannot access org.apache.avalon.excalibur.pool.Recyclable
> file org/apache/avalon/excalibur/pool/Recyclable.class not found
> public abstract class AbstractWingTransformer extends AbstractTransformer
> org.apache.avalon.excalibur.pool.Recyclable is an interface implemented by org.dspace.app.xmlui.wing.BitstreamReader and org.dspace.app.xmlui.cocoon.DSpaceFeedGenerator.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)