[ 
http://jira.codehaus.org/browse/MNG-2969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_94592
 ] 

Brian Fox commented on MNG-2969:
--------------------------------

Ok I see. The first question: Why can you add a dependency? That is used for 
some plugins like checkstyle where you need to add something to the classpath 
of the plugin (like a jar with custom rules).  The exclusions of standard 
dependencies are normally used to exclude things that should have been optional 
in the first place (or cause conflicts for whatever reason)

Specifically to plexus utils, if it really is a compile time dependency, then 
it would also be a runtime one. Because of previous behavior, maven "provided" 
a fixed version of plexus utils. This was removed but because some plugins 
actually where dependent on it and didn't declare it, maven will provide a 
minimum version (I forget the exact version now). I wouldn't rely on this 
functionality forever and excluding plexus from a plugin (if it where possible) 
would be very dangerous and subject to breaking a build on a maven upgrade.


> Unable to exclude a dependency from a needed plugin
> ---------------------------------------------------
>
>                 Key: MNG-2969
>                 URL: http://jira.codehaus.org/browse/MNG-2969
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.6
>            Reporter: Stefano Bagnara
>
> When we add a "standard" dependency we can tune its dependency list using the 
> exclusions directive.
> THis is not possible with plugins.
> Let's say I add javacc-maven-plugin to my build/plugins section and the 
> plugin declared in its pom:
>     <dependency>
>       <groupId>org.codehaus.plexus</groupId>
>       <artifactId>plexus-utils</artifactId>
>       <version>1.0.4</version>
>     </dependency>
> And I know that this dependency is a compile dependency and I won't need it, 
> how can I tune my plugin inclusion so to not download plexus-utils?
> in <pluginManagement> I can add new dependencies to plugin (WHY is this 
> needed?) but I cannot exclude existing dependencies: isn't this a bug?
> I can add a new dependency to the plugin and add exclusions for this new 
> dependency but I cannot add an exclusion for the top-level dependencies.
> Am I missing something?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to