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

Artifact filters from dependencies override module includes

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.4.0
    • None
    • Core
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            pburrowesOC Paul Burrowes

            Dates

              Created:
              Updated:

              Slack

                Issue deployment