Ivy
  1. Ivy
  2. IVY-1206

extra attributes lost from info when ivy file is merged with parent

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0-RC1, 2.2.0
    • Fix Version/s: 2.3.0-RC1
    • Component/s: None
    • Labels:
      None
    • Environment:

      OS: Ubuntu 10.04
      Java: 1.6.0_20-b02
      Ant: 1.8.0

      Description

      This is in relation to the new "extends" functionality in 2.2.0-rc1.

      When publishing an ivy file that extends a parent ivy file (using the default setting of merging the files), any extra attributes get dropped. This happens regardless of whether the extra attributes are in the child ivy file, parent ivy file, or both.

      Ideally, all extra attributes would undergo the same merge process as all the standard attributes (allowing them to be inherited from parent to child. But at the very least, they should not be removed from the child ivy file.

      Example:
      info section in original ivy file

      <info module="core-util" e:sourceurl="${svn.info.url}" e:sourcerev="${svn.info.wcversion}" e:user="${user.name}">
          <extends organisation="our-organisation" module="our-parent" revision="latest.integration"/>
      </info>
      

      info section in published (merged) ivy file

      <info organisation="our-organisation" module="core-util" branch="trunk" revision="2.2.51-SNAPSHOT.r30249" status="integration" publication="20100714140802">
          <!-- <extends organisation="our-organisation" module="our-parent" revision="working@mycomputer"/> -->
          
          <!-- description inherited from parent -->
          <description></description>
      </info>
      

      As you can see, all the "e:*" attributes have been dropped.

      1. IVY-1206.zip
        2 kB
        Robert Batusek

        Activity

        Hide
        Maarten Coene added a comment -

        I've committed a fix in SVN trunk that should solve the issue. Could you give it a try?

        Show
        Maarten Coene added a comment - I've committed a fix in SVN trunk that should solve the issue. Could you give it a try?
        Hide
        Robert Batusek added a comment -

        Reproducing the bus (see my comment)

        Show
        Robert Batusek added a comment - Reproducing the bus (see my comment)
        Hide
        Robert Batusek added a comment -

        I reproduced the problem on the latest trunk (today). I created a testcase reproducing the bug in my environment. How to reproduce:
        cd m1
        ant
        cd ../m2
        ant

        Now both modules are published in ivy, m2 extending m1, but m2 lacks the sqsg:extra attribute in its ivy descriptor.

        Show
        Robert Batusek added a comment - I reproduced the problem on the latest trunk (today). I created a testcase reproducing the bug in my environment. How to reproduce: cd m1 ant cd ../m2 ant Now both modules are published in ivy, m2 extending m1, but m2 lacks the sqsg:extra attribute in its ivy descriptor.
        Hide
        Timothy Bingaman added a comment -

        Just tried again with a build from the latest trunk source (https://svn.apache.org/repos/asf/ant/ivy/core/trunk) r1063531 and it's still not working for me. There are no e:* attributes left on the final delivered/published ivy file.

        I'll see if I can find time to create a test case.

        Show
        Timothy Bingaman added a comment - Just tried again with a build from the latest trunk source ( https://svn.apache.org/repos/asf/ant/ivy/core/trunk ) r1063531 and it's still not working for me. There are no e:* attributes left on the final delivered/published ivy file. I'll see if I can find time to create a test case.
        Hide
        Maarten Coene added a comment -

        I wasn't able to reproduce the issue with latest trunk version. Could you give it a try?
        If the problem is still there, would it be possible to upload a small testcase that illustrates the problem?

        Maarten

        Show
        Maarten Coene added a comment - I wasn't able to reproduce the issue with latest trunk version. Could you give it a try? If the problem is still there, would it be possible to upload a small testcase that illustrates the problem? Maarten
        Hide
        Bart Dooms added a comment -

        This can have serious problem.
        e.g.
        I use an custom attribute e:subsytem which is used in the ivypattern from my resolver: [organisation]/[subsystem]/[module]

        Because info extends doesn't user the extra attribute the resolve task doesn't find the correct ivy.xml file so no extends at all.

        Show
        Bart Dooms added a comment - This can have serious problem. e.g. I use an custom attribute e:subsytem which is used in the ivypattern from my resolver: [organisation] / [subsystem] / [module] Because info extends doesn't user the extra attribute the resolve task doesn't find the correct ivy.xml file so no extends at all.
        Hide
        Timothy Bingaman added a comment -

        This is still happening with the 2.2.0 final release.

        Show
        Timothy Bingaman added a comment - This is still happening with the 2.2.0 final release.

          People

          • Assignee:
            Maarten Coene
            Reporter:
            Timothy Bingaman
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development