Ivy
  1. Ivy
  2. IVY-108

cachefileset returns all cache files for empty conf

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3-RC1
    • Component/s: Ant
    • Labels:
      None
    • Environment:

      Windows NT, ant 1.6.2

      Description

      In case when conf contains no artifacts cachefileset returns all.
      For example ivy.xml contains one conf ("default" and "runtime") where "runtime" conf have no dependencies and "xxx" conf is not declared anywhere:
      <ivy-module version="1.0">
      <info organisation="cft" module="vp" status="stable"/>
      <configurations>
      <conf name="default"/>
      <conf name="runtime"/>
      </configurations>
      <dependencies>
      <dependency org="sun" name="servlet" rev="2.3" conf="default"/>
      </dependencies>
      </ivy-module>

      In build.xml:
      <ivy:cachefileset setid="p1" conf="xxx" type="jar"/> <!-- all files instead 0 (there are no such conf at all) -->
      <ivy:cachefileset setid="p2" conf="runtime" type="jar"/> <!-- all files instead 0 (no declared dependencies for runtime) -->
      <ivy:cachefileset setid="p3" conf="default" type="jar"/> <!-- one file. that's right -->
      <ivy:cachefileset setid="p4" conf="runtime,xxx" type="jar"/> <!- all files instead 0 -->
      <ivy:cachefileset setid="p5" conf="runtime,xxx,default" type="jar"/> <!-- one file. that's right -->

      In same cases using ivy:retrieve givs rights results.

      With best regards? Ivlev Dmitry.

        Activity

        Hide
        Xavier Hanin added a comment -

        Thanks for your report, I'll have a look when I have some time.

        Show
        Xavier Hanin added a comment - Thanks for your report, I'll have a look when I have some time.
        Hide
        Jeff Turner added a comment -

        I think I'm also seeing this issue. In ivy.xml I have:

        <configurations>
        <!-- Public configurations -->
        <conf name="default" extends="global" description="Main external config for runtime use of this module; other modules should typically depend on this config" />
        <!-- Private configurations -->
        <conf name="global" visibility="private" description="Artefacts required at build, test and runtime" />
        <conf name="build" extends="global" visibility="private" description="Artefacts required at build time only" />
        <conf name="ejb" visibility="private" description="Artefacts required in the EJB JAR file's manifest Class-Path entry "/>
        </configurations>
        <dependencies>
        <dependency org="bea" name="weblogic" rev="8.1sp4" conf="build->*"/>
        <dependency org="myorg" name="example1-core" rev="latest.integration" conf="global->default"/>
        </dependencies>

        In my build I have:

        <ivy:cachefileset setid="ejbjar.libs.fileset" conf="ejb"/>

        This fileset now includes all files from the Ivy cache. If I add the "ejb" conf to the last dependency, then the fileset contains the correct JARs:

        <dependency org="myorg" name="example1-core" rev="latest.integration" conf="global,ejb->default"/>

        Regards,
        Alastair.

        Show
        Jeff Turner added a comment - I think I'm also seeing this issue. In ivy.xml I have: <configurations> <!-- Public configurations --> <conf name="default" extends="global" description="Main external config for runtime use of this module; other modules should typically depend on this config" /> <!-- Private configurations --> <conf name="global" visibility="private" description="Artefacts required at build, test and runtime" /> <conf name="build" extends="global" visibility="private" description="Artefacts required at build time only" /> <conf name="ejb" visibility="private" description="Artefacts required in the EJB JAR file's manifest Class-Path entry "/> </configurations> <dependencies> <dependency org="bea" name="weblogic" rev="8.1sp4" conf="build->*"/> <dependency org="myorg" name="example1-core" rev="latest.integration" conf="global->default"/> </dependencies> In my build I have: <ivy:cachefileset setid="ejbjar.libs.fileset" conf="ejb"/> This fileset now includes all files from the Ivy cache. If I add the "ejb" conf to the last dependency, then the fileset contains the correct JARs: <dependency org="myorg" name="example1-core" rev="latest.integration" conf="global,ejb->default"/> Regards, Alastair.
        Hide
        Xavier Hanin added a comment -

        Empty conf now returns an empty fileset (according to the unit test I added). For unknown configurations, my tests was that it completely failed, which seems quite normal...

        Show
        Xavier Hanin added a comment - Empty conf now returns an empty fileset (according to the unit test I added). For unknown configurations, my tests was that it completely failed, which seems quite normal...

          People

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

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Development