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

Artifact filters from dependencies override module includes

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4.0
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Apache Ivy 2.4.0 - 20141213170938

      Description

      It looks like if a dependency includes an `<artifact>` filter then only artifacts that match `<artifact>` filters will be resolved for the common dependency

      E.g. with three modules a, b and c, resolving for c will only fetch a.war, not a-api.jar despite directly depending on the api conf of a.

      a/ivy.xml:
      <ivy>
      <info module="a"/>
      <configurations>
      <configuration name="api"/>
      <configuration name="deploy"/>
      </configurations>

      <publications>
      <artifact name="a-api" type="jar" conf="api"/>
      <artifact name="a" type="war" conf="deploy"/>
      </publications>
      </ivy>

      b/ivy.xml
      <ivy>
      <info module="b"/>
      <configurations>
      <configuration name="api"/>
      <configuration name="deploy"/>
      </configurations>
      <dependencies>
      <dependency name="a" conf="deploy">
      <artifact name="a" type="war" conf="deploy"/>
      </dependency>
      </dependencies>
      </ivy>

      c/ivy.xml
      <ivy>
      <info module="c"/>
      <configurations>
      <configuration name="api"/>
      <configuration name="deploy"/>
      </configurations>
      <dependencies>
      <dependency name="a" conf="api">
      <dependency name="b" conf="deploy">
      </dependencies>
      </ivy>

      The logic in IvyNodeUsage.getDependencyIncludesSet() is being overridden by IvyNode.getDependencies() which treats an empty includes set as "include nothing" when an upstream dependency provides a set of artifacts.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pburrowesOC Paul Burrowes
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: