0

Application A uses log4net version 1.2.10.0 and is built using my CI process, and as a result, is stored in my Ivy Shared folder. (No problems here)

Application B references Application A, as well as references the newer version of log4net, namely 1.2.11.0. As the CI process resolves the dependencies into my binary folder for application B, it conflicts when trying to get versions 1.2.10.0 and 1.2.11.0 of log4net.dll.

Is there a way that I can instruct Ivy to allow it to overwrite a dependency, at an individual/per-dependency level, to get the newer version, and that it shouldn't fail the build on the arrival of this conflict?

Or, do I have to go and rebuild Application A using version 1.2.10.0 of log4net and re-release it so that Application B doesn't have issues with it's transitative dependencies?

4

1 回答 1

2

The issue you're having is a transitive dependency conflict. One transitive dependency for Application A is conflicting with a direct dependency in Application B. As in Maven, use the exclude tag in Application B:

<dependencies>  
   <dependency org="org.hibernate" name="hibernate-core" rev="3.3.1.GA" conf='..'> 
       <exclude name='jaas' /> 
       <exclude name='jacc' />
   </dependency>
</dependencies>

See Ivy: how do I remove transitive dependencies?.

于 2012-08-20T14:38:11.717 回答