[ 
https://jira.codehaus.org/browse/MDEP-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=360572#comment-360572
 ] 

Henning Schmiedehausen commented on MDEP-476:
---------------------------------------------

I would expect so too, but sadly that is not the case. The problem is that the 
byte code interpretation simply is not smart enough to cope with a number of 
pathological situations where the only use of a jar is e.g. a 
non-runtime-retained annotation. Or where multiple jars exist that contain the 
same annotations.

If you feel adventurous, check out 
https://github.com/basepom/basepom/tree/dependency-integration-test and try to 
get all the integration tests to pass 
without adding exclusions. Now assume that dep-305 or dep-annotations are third 
party jars where you can not change the scope. 

The net result is always one of the errors seen in the build.log files.

I am waging a war on the jsr305 jar for years now, but it will not go away. The 
best way to fix that problem is to allow the dependency plugin to ignore it. 
That is what motivated this patch. 



> add the ability to ignore dependencies in the analyze-* goals
> -------------------------------------------------------------
>
>                 Key: MDEP-476
>                 URL: https://jira.codehaus.org/browse/MDEP-476
>             Project: Maven Dependency Plugin
>          Issue Type: New Feature
>          Components: analyze
>    Affects Versions: 2.9
>            Reporter: Henning Schmiedehausen
>
> The dependency plugin is an essential tool to keep any build sane and from 
> going off the rails with stale and bad dependencies. However, there are the 
> few very odd corner cases where a dependency must be on the class path to 
> ensure compilation but it is not detectable from byte code. 
> The most prominent example for this are the 
> com.google.code.findbugs:annotations and com.google.code.findbugs:jsr305 
> jars, which only contain annotations but very often lead to unresolvable 
> compilation problems with both jars present on the classpath.
> The analyze goals should have facilities to
> - list dependencies that should be ignored if they are declared but unused
> - list dependencies that should be ignored if they are undeclared but used
> - list dependencies that should be ignored in either case.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to