Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-431

Module wide exclude

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-alpha-2
    • Component/s: None
    • Labels:
      None

      Description

      For the moment Ivy provides a way to exclude transitive dependencies provided by a dependency in the dependency declaration itself:

      <dependency name="A" rev="1.0">
        <exclude module="B"/>
      </dependency>
      

      But sometimes the same transitive dependency is obtained by several direct dependencies, so you have to exclude it in several dependency declarations.

      So what would be nice is a way to exclude a module more globally:

      • at a module level (declared somewhere in the Ivy file)
      • at a global level (declared somewhere in ivyconf?)

      The problem I see with defining such a global exclude in ivyconf is that it makes the ivy file not self contained. It's already the case with conflict-manager defined globally in ivyconf, so I don't know if it's a big problem or not. May be we should at least warn about that, or inject ivyconf wide settings in the ivy file at deliver time.

      Proposed syntax:
      In Ivy files, add a top level exclude section (like the conflicts section) containing rules of modules/artifacts to exclude:

      <exclude>
        <rule module="*servlet*" matcher="glob" conf="weblib" /> 
        <rule org="acme" module="*test" artifact="test*" type="source" ext="jar" matcher="glob" /> 
      </exclude>
      

      Note that the conf in the first rule corresponds to conf of the module in which I define the exclusion rule, and restricts the exclusion to this conf only (similar to the conf attribute on the exclude element of dependency).

      In ivyconf, either use the same syntax, or use the modules section to define exclusion the same way conflict manager are defined. The advantage of the latter is that it follows the existing syntax, but I think it's less clear, and doesn't allow to exclude artifacts only. If we follow the same syntax as in ivy files, the conf wouldn't be allowed since it has no meaning.

        Attachments

          Activity

            People

            • Assignee:
              xavier Xavier Hanin
              Reporter:
              xavier Xavier Hanin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: