[
https://issues.apache.org/jira/browse/IVY-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated IVY-1516:
-----------------------------
Environment: Ivy 2.4.0, IvyDE 2.2.0.final, Ant 1.9.4 (was: Ivy 2.4.0, Ant
1.9.4)
> Module that extends is not picking up exclude element(s) from parent's
> dependencies
> -----------------------------------------------------------------------------------
>
> Key: IVY-1516
> URL: https://issues.apache.org/jira/browse/IVY-1516
> Project: Ivy
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.4.0
> Environment: Ivy 2.4.0, IvyDE 2.2.0.final, Ant 1.9.4
> Reporter: Eric Milles
>
> I have a base project that defines a number of configurations and
> dependencies, including a few exclude elements to prevent conflicting
> dependencies from coming in transitively. In a child module, the
> configurations and dependencies are being inherited properly, but the
> excludes no longer take effect.
> {noformat}
> <ivy-module version="2.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
> <info module="A" organisation="com.org" />
> <configurations>
> <conf name="local" visibility="private"
> description="Artifacts necessary for local development and testing" />
> <conf name="master" />
> </configurations>
> <dependencies defaultconf="master" defaultconfmapping="*->master,runtime()">
> <dependency org="log4j" name="log4j" rev="1.2.17" />
> <dependency org="org.slf4j" name="slf4j-api" rev="1.7.10" />
> <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.7.10" />
> <dependency org="org.slf4j" name="jcl-over-slf4j" rev="1.7.10" />
> <!-- ensure logging flows through the chosen 4 by excluding potential
> interlopers -->
> <exclude conf="local" matcher="regexp"
> org=".*(commons-logging|logback|log4j|slf4j)" />
> <exclude conf="master" matcher="regexp"
> module="(commons-logging|logback|log4j-over|slf4j-(?!api|log4j)).*" />
> </dependencies>
> </ivy-module>
> <ivy-module version="2.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
> <info module="B" organisation="com.org">
> <extends module="A" organisation="com.org"
> extendType="configurations,dependencies" location="../A/ivy.xml"
> revision="latest" />
> <dependencies defaultconf="master"
> defaultconfmapping="*->master,runtime()">
> <dependency ... conf="local" /><!-- this dependency includes
> commons-logging transitively and the exclude from module A should stop that
> from coming in so that jcl-over-slf4j is used instead -->
> </dependencies>
> </info>
> </ivy-module>
> {noformat}
> Also, if the dependency here defined in B was moved up to A, the exclude
> properly removes commons-logging from A's libraries. But commons-logging
> will appear in B's libraries.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)