Ivy
  1. Ivy
  2. IVY-1096

[originalname] not expanded during retrieve when module descriptor contains extra attributes.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1.0-RC1
    • Fix Version/s: 2.1.0-RC2
    • Component/s: None
    • Labels:
      None

      Description

      If a module descriptor contains extra attributes in the info element, when artifacts for that module are retrieved, the [originalname] token doesn't get expanded, remaining as the literal text "[originalname]".

      1. ivytest.zip
        2 kB
        Ross Clewley

        Activity

        Hide
        Ross Clewley added a comment -

        Verified fix in SVN trunk Ivy 2.2.x-local-20090629094311.

        Show
        Ross Clewley added a comment - Verified fix in SVN trunk Ivy 2.2.x-local-20090629094311.
        Hide
        Maarten Coene added a comment -

        ok, I think I've found it.
        Please could you given the trunk version another try?

        Maarten

        Show
        Maarten Coene added a comment - ok, I think I've found it. Please could you given the trunk version another try? Maarten
        Hide
        Ross Clewley added a comment -

        Verbose ant output from the testcase:

        Apache Ant version 1.7.0 compiled on May 29 2009
        Buildfile: build.xml
        Detected Java version: 1.6 in: /opt/sun-jdk-1.6.0.13/jre
        Detected OS: Linux
        parsing buildfile /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/build.xml with URI = file:/scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/build.xml
        Project base dir set to: /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest
        [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
        parsing buildfile jar:file:/scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/ivy.jar!/fr/jayasoft/ivy/ant/antlib.xml with URI = jar:file:/scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/ivy.jar!/fr/jayasoft/ivy/ant/antlib.xml
        Build sequence for target(s) `retrieve' is [configure, resolve, dist, publish, retrieve]
        Complete build sequence is [configure, resolve, dist, publish, retrieve, clean, ]
        — ivytest [configure]:
        [antlib:antlib:org.apache.ivy.ant] Could not load definitions from resource antlib:org/apache/ivy/ant/antlib.xml. It could not be found.
        — ivytest [resolve]:
        [ivy:resolve] Loading jar:file:/scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/ivy.jar!/org/apache/ivy/core/settings/ivy.properties
        [ivy:resolve] :: Ivy 2.2.x-local-20090622102802 - 20090622102802 :: http://ant.apache.org/ivy/ ::
        [ivy:resolve] :: loading settings :: file = /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/ivysettings.xml
        [ivy:resolve] no default ivy user dir defined: set to /usr/home/rclewley/.ivy2
        [ivy:resolve] no default cache defined: set to /usr/home/rclewley/.ivy2/cache
        [ivy:resolve] settings loaded (70ms)
        [ivy:resolve] default cache: /usr/home/rclewley/.ivy2/cache
        [ivy:resolve] default resolver: local
        [ivy:resolve] – 1 resolvers:
        [ivy:resolve] local [file]
        [ivy:resolve] using ivy parser to parse file:/scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/ivy.xml
        [ivy:resolve] :: resolving dependencies :: webcenter#ivytest;1
        [ivy:resolve] confs: [default]
        [ivy:resolve] validate = false
        [ivy:resolve] refresh = false
        [ivy:resolve] resolving dependencies for configuration 'default'
        [ivy:resolve] == resolving dependencies for webcenter#ivytest;1 [default]
        [ivy:resolve] resolved ivy file produced in /usr/home/rclewley/.ivy2/cache/resolved-webcenter-ivytest-1.xml
        [ivy:resolve] :: downloading artifacts ::
        [ivy:resolve] :: resolution report :: resolve 57ms :: artifacts dl 0ms
        ---------------------------------------------------------------------

          modules artifacts
        conf number search dwnlded evicted number dwnlded

        ---------------------------------------------------------------------

        default 0 0 0 0 0 0

        ---------------------------------------------------------------------
        [ivy:resolve] report for webcenter#ivytest;1 default produced in /usr/home/rclewley/.ivy2/cache/webcenter-ivytest-default.xml
        [ivy:resolve] resolve done (57ms resolve - 0ms download)
        — ivytest [dist]:
        [mkdir] Created dir: /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/tmp
        [jar] Warning: skipping jar archive /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/tmp/ivytest.jar because no files were included.
        [jar] Building MANIFEST-only jar: /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/tmp/ivytest.jar
        [jar] adding directory META-INF/
        [jar] adding entry META-INF/MANIFEST.MF
        — ivytest [publish]:
        [delete] Could not find file /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/build/ivy.xml to delete.
        Overriding previous definition of property "ivy.version"
        Overriding previous definition of property "ivy.version"
        [property] Loading /tmp/delivery.properties
        [property] Unable to find property file: /tmp/delivery.properties
        :: delivering :: webcenter#ivytest;1 :: 1 :: integration :: Mon Jun 22 14:11:11 IST 2009
        delivering ivy file to /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/tmp/ivy.xml
        :: publishing :: webcenter#ivytest
        published ivytest to /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivytest.jar
        published ivy to /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivy.xml
        — ivytest [retrieve]:
        Overriding previous definition of property "ivy.version"
        [ivy:resolve] :: resolving dependencies :: webcenter#ivytest-caller;working
        [ivy:resolve] confs: [default]
        [ivy:resolve] validate = false
        [ivy:resolve] refresh = false
        [ivy:resolve] resolving dependencies for configuration 'default'
        [ivy:resolve] == resolving dependencies for webcenter#ivytest-caller;working [default]
        [ivy:resolve] == resolving dependencies webcenter#ivytest-caller;working->webcenter#ivytest;latest.integration [default->default]
        [ivy:resolve] default-cache: no cached resolved revision for webcenter#ivytest;latest.integration
        [ivy:resolve] tried /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/[revision]/ivy.xml
        [ivy:resolve] local: found md file for webcenter#ivytest;latest.integration
        [ivy:resolve] => /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivy.xml (1)
        [ivy:resolve] downloading /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivy.xml ...
        [ivy:resolve] local: downloading /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivy.xml
        [ivy:resolve] [SUCCESSFUL ] webcenter#ivytest;1!ivy.xml(ivy.original) (7ms)
        [ivy:resolve] [1] webcenter#ivytest
        [ivy:resolve] found webcenter#ivytest;1 in local
        [ivy:resolve] [1] webcenter#ivytest;latest.integration
        [ivy:resolve] resolved ivy file produced in /usr/home/rclewley/.ivy2/cache/resolved-webcenter-ivytest-caller-working.xml
        [ivy:resolve] :: downloading artifacts ::
        [ivy:resolve] tried /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivytest.jar
        [ivy:resolve] downloading /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivytest.jar ...
        [ivy:resolve] local: downloading /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivytest.jar
        [ivy:resolve] .. (0kB)
        [ivy:resolve] [SUCCESSFUL ] webcenter#ivytest;1!ivytest.jar (8ms)
        [ivy:resolve] :: resolution report :: resolve 89ms :: artifacts dl 11ms
        ---------------------------------------------------------------------

          modules artifacts
        conf number search dwnlded evicted number dwnlded

        ---------------------------------------------------------------------

        default 1 1 1 0 1 1

        ---------------------------------------------------------------------
        [ivy:resolve] report for webcenter#ivytest-caller;working default produced in /usr/home/rclewley/.ivy2/cache/webcenter-ivytest-caller-default.xml
        [ivy:resolve] resolve done (89ms resolve - 11ms download)
        Overriding previous definition of reference to ivy.resolved.report
        Overriding previous definition of reference to ivy.resolved.configurations.ref
        Overriding previous definition of reference to ivy.resolved.descriptor
        Overriding previous definition of property "ivy.organisation"
        Overriding previous definition of property "ivy.module"
        Overriding previous definition of property "ivy.revision"
        Overriding previous definition of property "ivy.deps.changed"
        Overriding previous definition of property "ivy.resolved.configurations"
        Overriding previous definition of property "ivy.version"
        [ivy:retrieve] :: retrieving :: webcenter#ivytest-caller
        [ivy:retrieve] checkUpToDate=true
        [ivy:retrieve] confs: [default]
        [ivy:retrieve] retrieving /usr/home/rclewley/.ivy2/cache/webcenter/ivytest/jars/ivytest-1.jar
        [ivy:retrieve] to /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/lib/[originalname].jar
        [ivy:retrieve] 1 artifacts copied, 0 already retrieved (0kB/41ms)
        [ivy:retrieve] retrieve done (41ms)

        Show
        Ross Clewley added a comment - Verbose ant output from the testcase: Apache Ant version 1.7.0 compiled on May 29 2009 Buildfile: build.xml Detected Java version: 1.6 in: /opt/sun-jdk-1.6.0.13/jre Detected OS: Linux parsing buildfile /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/build.xml with URI = file:/scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/build.xml Project base dir set to: /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. parsing buildfile jar: file:/scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/ivy.jar!/fr/jayasoft/ivy/ant/antlib.xml with URI = jar: file:/scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/ivy.jar!/fr/jayasoft/ivy/ant/antlib.xml Build sequence for target(s) `retrieve' is [configure, resolve, dist, publish, retrieve] Complete build sequence is [configure, resolve, dist, publish, retrieve, clean, ] — ivytest [configure] : [antlib:antlib:org.apache.ivy.ant] Could not load definitions from resource antlib:org/apache/ivy/ant/antlib.xml. It could not be found. — ivytest [resolve] : [ivy:resolve] Loading jar: file:/scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/ivy.jar!/org/apache/ivy/core/settings/ivy.properties [ivy:resolve] :: Ivy 2.2.x-local-20090622102802 - 20090622102802 :: http://ant.apache.org/ivy/ :: [ivy:resolve] :: loading settings :: file = /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/ivysettings.xml [ivy:resolve] no default ivy user dir defined: set to /usr/home/rclewley/.ivy2 [ivy:resolve] no default cache defined: set to /usr/home/rclewley/.ivy2/cache [ivy:resolve] settings loaded (70ms) [ivy:resolve] default cache: /usr/home/rclewley/.ivy2/cache [ivy:resolve] default resolver: local [ivy:resolve] – 1 resolvers: [ivy:resolve] local [file] [ivy:resolve] using ivy parser to parse file:/scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/ivy.xml [ivy:resolve] :: resolving dependencies :: webcenter#ivytest;1 [ivy:resolve] confs: [default] [ivy:resolve] validate = false [ivy:resolve] refresh = false [ivy:resolve] resolving dependencies for configuration 'default' [ivy:resolve] == resolving dependencies for webcenter#ivytest;1 [default] [ivy:resolve] resolved ivy file produced in /usr/home/rclewley/.ivy2/cache/resolved-webcenter-ivytest-1.xml [ivy:resolve] :: downloading artifacts :: [ivy:resolve] :: resolution report :: resolve 57ms :: artifacts dl 0ms ---------------------------------------------------------------------   modules artifacts conf number search dwnlded evicted number dwnlded --------------------------------------------------------------------- default 0 0 0 0 0 0 --------------------------------------------------------------------- [ivy:resolve] report for webcenter#ivytest;1 default produced in /usr/home/rclewley/.ivy2/cache/webcenter-ivytest-default.xml [ivy:resolve] resolve done (57ms resolve - 0ms download) — ivytest [dist] : [mkdir] Created dir: /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/tmp [jar] Warning: skipping jar archive /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/tmp/ivytest.jar because no files were included. [jar] Building MANIFEST-only jar: /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/tmp/ivytest.jar [jar] adding directory META-INF/ [jar] adding entry META-INF/MANIFEST.MF — ivytest [publish] : [delete] Could not find file /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/build/ivy.xml to delete. Overriding previous definition of property "ivy.version" Overriding previous definition of property "ivy.version" [property] Loading /tmp/delivery.properties [property] Unable to find property file: /tmp/delivery.properties :: delivering :: webcenter#ivytest;1 :: 1 :: integration :: Mon Jun 22 14:11:11 IST 2009 delivering ivy file to /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/tmp/ivy.xml :: publishing :: webcenter#ivytest published ivytest to /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivytest.jar published ivy to /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivy.xml — ivytest [retrieve] : Overriding previous definition of property "ivy.version" [ivy:resolve] :: resolving dependencies :: webcenter#ivytest-caller;working [ivy:resolve] confs: [default] [ivy:resolve] validate = false [ivy:resolve] refresh = false [ivy:resolve] resolving dependencies for configuration 'default' [ivy:resolve] == resolving dependencies for webcenter#ivytest-caller;working [default] [ivy:resolve] == resolving dependencies webcenter#ivytest-caller;working->webcenter#ivytest;latest.integration [default->default] [ivy:resolve] default-cache: no cached resolved revision for webcenter#ivytest;latest.integration [ivy:resolve] tried /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/ [revision] /ivy.xml [ivy:resolve] local: found md file for webcenter#ivytest;latest.integration [ivy:resolve] => /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivy.xml (1) [ivy:resolve] downloading /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivy.xml ... [ivy:resolve] local: downloading /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivy.xml [ivy:resolve] [SUCCESSFUL ] webcenter#ivytest;1!ivy.xml(ivy.original) (7ms) [ivy:resolve] [1] webcenter#ivytest [ivy:resolve] found webcenter#ivytest;1 in local [ivy:resolve] [1] webcenter#ivytest;latest.integration [ivy:resolve] resolved ivy file produced in /usr/home/rclewley/.ivy2/cache/resolved-webcenter-ivytest-caller-working.xml [ivy:resolve] :: downloading artifacts :: [ivy:resolve] tried /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivytest.jar [ivy:resolve] downloading /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivytest.jar ... [ivy:resolve] local: downloading /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/local/webcenter/ivytest/1/ivytest.jar [ivy:resolve] .. (0kB) [ivy:resolve] [SUCCESSFUL ] webcenter#ivytest;1!ivytest.jar (8ms) [ivy:resolve] :: resolution report :: resolve 89ms :: artifacts dl 11ms ---------------------------------------------------------------------   modules artifacts conf number search dwnlded evicted number dwnlded --------------------------------------------------------------------- default 1 1 1 0 1 1 --------------------------------------------------------------------- [ivy:resolve] report for webcenter#ivytest-caller;working default produced in /usr/home/rclewley/.ivy2/cache/webcenter-ivytest-caller-default.xml [ivy:resolve] resolve done (89ms resolve - 11ms download) Overriding previous definition of reference to ivy.resolved.report Overriding previous definition of reference to ivy.resolved.configurations.ref Overriding previous definition of reference to ivy.resolved.descriptor Overriding previous definition of property "ivy.organisation" Overriding previous definition of property "ivy.module" Overriding previous definition of property "ivy.revision" Overriding previous definition of property "ivy.deps.changed" Overriding previous definition of property "ivy.resolved.configurations" Overriding previous definition of property "ivy.version" [ivy:retrieve] :: retrieving :: webcenter#ivytest-caller [ivy:retrieve] checkUpToDate=true [ivy:retrieve] confs: [default] [ivy:retrieve] retrieving /usr/home/rclewley/.ivy2/cache/webcenter/ivytest/jars/ivytest-1.jar [ivy:retrieve] to /scratch/rclewley/view_storage/rclewley_workplace_newbuild2/ivytest/lib/ [originalname] .jar [ivy:retrieve] 1 artifacts copied, 0 already retrieved (0kB/41ms) [ivy:retrieve] retrieve done (41ms)
        Hide
        Maarten Coene added a comment -

        Could you post the debug output from Ant here? (ant -v ...)

        Show
        Maarten Coene added a comment - Could you post the debug output from Ant here? (ant -v ...)
        Hide
        Ross Clewley added a comment -

        Reopening as issue is still seen on SVN trunk.

        Show
        Ross Clewley added a comment - Reopening as issue is still seen on SVN trunk.
        Hide
        Ross Clewley added a comment -

        Hi Maarten

        Thanks for taking a look at this. However, I checked out SVN trunk again this morning and I'm still seeing the same issue with my testcase, as detailed above.

        Ross

        Show
        Ross Clewley added a comment - Hi Maarten Thanks for taking a look at this. However, I checked out SVN trunk again this morning and I'm still seeing the same issue with my testcase, as detailed above. Ross
        Hide
        Maarten Coene added a comment -

        I think I was able to fix the problem and updated the code in SVN trunk.
        Could you please give it a try?

        Maarten

        Show
        Maarten Coene added a comment - I think I was able to fix the problem and updated the code in SVN trunk. Could you please give it a try? Maarten
        Hide
        Ross Clewley added a comment -

        Also tested and reproduced on trunk - Ivy 2.2.x-local-20090616143956 - 20090616143956.

        Show
        Ross Clewley added a comment - Also tested and reproduced on trunk - Ivy 2.2.x-local-20090616143956 - 20090616143956.
        Hide
        Ross Clewley added a comment - - edited

        I've uploaded a small ant testcase to demonstrate the problem. This publishes a trivial module to a local repository and then does an inline resolve and a retrieve to pull it back again. Invoke the "retrieve" target to demonstrate this.

        The ivy file contains a namespaced extra attribute. With this in place the result is

        lib/[originalname].jar

        If you remove the extra attribute from the ivy file, clean and re-run the testcase you correctly get back

        lib/ivytest.jar

        Show
        Ross Clewley added a comment - - edited I've uploaded a small ant testcase to demonstrate the problem. This publishes a trivial module to a local repository and then does an inline resolve and a retrieve to pull it back again. Invoke the "retrieve" target to demonstrate this. The ivy file contains a namespaced extra attribute. With this in place the result is lib/ [originalname] .jar If you remove the extra attribute from the ivy file, clean and re-run the testcase you correctly get back lib/ivytest.jar

          People

          • Assignee:
            Maarten Coene
            Reporter:
            Ross Clewley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development