You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Eric Milles (JIRA)" <ji...@apache.org> on 2015/03/16 21:51:38 UTC

[jira] [Updated] (IVY-1516) Module that uses extends is not picking up exclude element(s) from patent's dependencies definition

     [ https://issues.apache.org/jira/browse/IVY-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles updated IVY-1516:
-----------------------------
    Description: 
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.

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


  was:
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.

<ivy-module>
  <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>
  <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 log4j transitively and the exclude from module A should stop that from coming in -->
    </dependencies>
  </info>



> Module that uses extends is not picking up exclude element(s) from patent's dependencies definition
> ---------------------------------------------------------------------------------------------------
>
>                 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, 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.
> <ivy-module>
>   <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>
>   <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>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)