You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Jason Porter (JIRA)" <ji...@apache.org> on 2009/05/01 07:05:30 UTC

[jira] Commented: (IVY-983) exclude does not work in non-trivial conf case

    [ https://issues.apache.org/jira/browse/IVY-983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704897#action_12704897 ] 

Jason Porter commented on IVY-983:
----------------------------------

The root of this issue (at least from my debugging and testing) stems from the dependency only belonging to one configuration.  In the example by Benjamin log4j is only assigned to the provided scope.  It's included in compile and war because they extend provided but it is not actually in those configurations.  If you were to debug it and look at the DependencyDescriptor it would say this (toString): log4j#log4j;1.2.14 {provided=[default]}.  I think what we'd expect it to say is this: log4j#log4j;1.2.14 {provided=[default], compile=[default]}.  In this example: log4j#log4j:1.2.13 {default=[default]} or {compile=[<something, can't tell>]} which is why you can't exclude it from the war config, because it isn't even in there.

Either we need to traverse the configuration graph and add each configuration where it appears (include extensions) or the exclude needs to traverse the graph looking at every configuration that makes up the one listed in the conf attribute.  Sorry if that wasn't very coherent :)



> exclude does not work in non-trivial conf case
> ----------------------------------------------
>
>                 Key: IVY-983
>                 URL: https://issues.apache.org/jira/browse/IVY-983
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.0-RC2
>         Environment: Ubuntu, Linux
>            Reporter: Benjamin Damm
>            Priority: Critical
>
> I'm running into a problem with <exclude>... my ivy.xml looks like this:
> <ivy-module version="2.0">
>         <info organisation="ssn-src" module="pc"/>
>         <configurations defaultconfmapping="default->default">
>                 <conf name="default" />
>                 <conf name="provided" description="they are provided by the env." />
>                 <conf name="compile" extends="default,provided" />
>                 <conf name="war" extends="default"/>
>         </configurations>
>         <dependencies>
> ...
>                 <dependency org="log4j" name="log4j" rev="1.2.14+" 
> conf="provided->default"/>
> ... <!-- other deps; indirect depends on log4j 1.2.13 in all my confs. -->
>                 <exclude module="log4j" conf="war"/>
> Now, log4j;1.2.14 is in my compile conf, as I expect it to be.  But 
> log4j;1.2.13 appears in my war conf, which is not what I expect.  I expect 
> there to be no log4j because in this case the environment will provide it 
> (jboss) with its own custom.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.