maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Elliot (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MNG-1977) Global dependency exclusions
Date Sun, 27 Mar 2011 18:19:22 GMT

    [ http://jira.codehaus.org/browse/MNG-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=261614#action_261614
] 

Rob Elliot commented on MNG-1977:
---------------------------------

Maven definitely makes provided scope dependencies available at compile time - otherwise no
library compiled against the servlet api would compile.  A good example in the logging context
would be someone who desired to use slf4j-over-log4j instead of log4j.  Making log4j itself
have scope provided would have the desired runtime behaviour of excluding the log4j jar if
any transitive dependency brought it in, thereby preventing any non-determinate behaviour
depending on which version of the log4j classes the classloader loaded first; however, at
compile time Maven would happily be able to compile code dependent on classes that are included
in log4j but are not in slf4j-over-log4j, and the user would only discover the problem at
runtime.

> Global dependency exclusions
> ----------------------------
>
>                 Key: MNG-1977
>                 URL: http://jira.codehaus.org/browse/MNG-1977
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: POM
>            Reporter: Kees de Kooter
>             Fix For: 3.1
>
>
> I depend on some libraries, which in turn depend on something
> (which in turn depend on something) that I don't want, because I declare
> some other artifact in my pom.xml.
> A concrete example: I don't want that the artifact "xerces" is imported in
> my project because I declare to depend on  "xercesImpl" which ships newer
> libraries but with the same namespaces.
> I guess I would need an "exclude transitive dependency at all", either
> globally or from this and that artifact. I saw the <exclusions> tag, but it
> forces me to be very verbose and have exact control on what is required by a
> dependency.

-- 
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

        

Mime
View raw message