ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Scheetz (JIRA)" <j...@apache.org>
Subject [jira] Updated: (IVY-1111) Ivy deliver fails to replace dynamic revision when using extra attributes
Date Thu, 03 Sep 2009 23:06:58 GMT

     [ https://issues.apache.org/jira/browse/IVY-1111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Scheetz updated IVY-1111:
---------------------------------

    Description: 
Running ivy:deliver does not replace the dynamic revision correctly if I also use extended
attributes.

My Repository contains four modules: junit in revision 3.8 and 4.4. A Module A that depends
on junit 4.4 and a module B that depends on junit "3.8.+".  (I just copied this layout from
a similar defect, IVY999). (I will add a zip with this setup once I figure out how).

My ivy.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
    <info organisation="test" module="c" e:att="att" />
<!--adressmodul -->
    <configurations>
        <conf name="default" visibility="public"/>
    </configurations>
	<publications/>    
    <dependencies>
        <dependency org="test" name="a" rev="latest.integration"/>
        <dependency org="junit" name="junit" conf="default" rev="latest.integration"/>
        <dependency org="test" name="b" rev="latest.integration" e:att="att"/>
    </dependencies>
</ivy-module>

The resultant ivy.xml after running the deliver task:
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
    <info organisation="test" module="c" revision="20090819111124" status="integration"
publication="20090819111124" e:att="att"/>
<!--adressmodul -->
    <configurations>
        <conf name="default" visibility="public"/>
    </configurations>
	<publications/>    
    <dependencies>
        <dependency org="test" name="a" rev="1" revConstraint="latest.integration"/>
        <dependency org="junit" name="junit" conf="default" rev="4.4" revConstraint="latest.integration"/>
        <dependency org="test" name="b" rev="latest.integration" e:att="att"/>
    </dependencies>
</ivy-module>


Update:
A problem appears to be in the DeliverEngine.deliver(ModuleRevisionId, String, String, DeliverOptions)
method, in step #3.  Using SVN revision 811164, the line at 159 is:
      String rev = (String) resolvedRevisions.get(dependencies[i].getDependencyRevisionId());
            if (rev == null) {
                rev = dependencies[i].getDependencyRevisionId().getRevision();
            }

There are two ModuleRevisionId objects, one in the map and one in the DependencyDescriptor
but they have different extra attributes.  The one in the DependencyDescriptor includes the
namespace on the extra attribute while the one in the map does not.  Hence the lookup in the
map is a miss so the failover action is to use the revision out of the DependencyDescriptor
objects ModuleRevisionId, which is a dynamic revision.


  was:
Running ivy:deliver does not replace the dynamic revision correctly if I also use extended
attributes.

My Repository contains four modules: junit in revision 3.8 and 4.4. A Module A that depends
on junit 4.4 and a module B that depends on junit "3.8.+".  (I just copied this layout from
a similar defect, IVY999). (I will add a zip with this setup once I figure out how).

My ivy.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
    <info organisation="test" module="c" e:att="att" />
<!--adressmodul -->
    <configurations>
        <conf name="default" visibility="public"/>
    </configurations>
	<publications/>    
    <dependencies>
        <dependency org="test" name="a" rev="latest.integration"/>
        <dependency org="junit" name="junit" conf="default" rev="latest.integration"/>
        <dependency org="test" name="b" rev="latest.integration" e:att="att"/>
    </dependencies>
</ivy-module>

The resultant ivy.xml after running the deliver task:
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
    <info organisation="test" module="c" revision="20090819111124" status="integration"
publication="20090819111124" e:att="att"/>
<!--adressmodul -->
    <configurations>
        <conf name="default" visibility="public"/>
    </configurations>
	<publications/>    
    <dependencies>
        <dependency org="test" name="a" rev="1" revConstraint="latest.integration"/>
        <dependency org="junit" name="junit" conf="default" rev="4.4" revConstraint="latest.integration"/>
        <dependency org="test" name="b" rev="latest.integration" e:att="att"/>
    </dependencies>
</ivy-module>



> Ivy deliver fails to replace dynamic revision when using extra attributes
> -------------------------------------------------------------------------
>
>                 Key: IVY-1111
>                 URL: https://issues.apache.org/jira/browse/IVY-1111
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.0-RC2
>         Environment: Ivy 2.1.0-rc2 - 20090704004254
> Apache Ant version 1.7.0 compiled on December 13 2006
>            Reporter: Michael Scheetz
>         Attachments: IVY-1111.svn.patch, ivy-1111.zip
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Running ivy:deliver does not replace the dynamic revision correctly if I also use extended
attributes.
> My Repository contains four modules: junit in revision 3.8 and 4.4. A Module A that depends
on junit 4.4 and a module B that depends on junit "3.8.+".  (I just copied this layout from
a similar defect, IVY999). (I will add a zip with this setup once I figure out how).
> My ivy.xml file:
> <?xml version="1.0" encoding="UTF-8"?>
> <ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
>     <info organisation="test" module="c" e:att="att" />
> <!--adressmodul -->
>     <configurations>
>         <conf name="default" visibility="public"/>
>     </configurations>
> 	<publications/>    
>     <dependencies>
>         <dependency org="test" name="a" rev="latest.integration"/>
>         <dependency org="junit" name="junit" conf="default" rev="latest.integration"/>
>         <dependency org="test" name="b" rev="latest.integration" e:att="att"/>
>     </dependencies>
> </ivy-module>
> The resultant ivy.xml after running the deliver task:
> <?xml version="1.0" encoding="UTF-8"?>
> <ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
>     <info organisation="test" module="c" revision="20090819111124" status="integration"
publication="20090819111124" e:att="att"/>
> <!--adressmodul -->
>     <configurations>
>         <conf name="default" visibility="public"/>
>     </configurations>
> 	<publications/>    
>     <dependencies>
>         <dependency org="test" name="a" rev="1" revConstraint="latest.integration"/>
>         <dependency org="junit" name="junit" conf="default" rev="4.4" revConstraint="latest.integration"/>
>         <dependency org="test" name="b" rev="latest.integration" e:att="att"/>
>     </dependencies>
> </ivy-module>
> Update:
> A problem appears to be in the DeliverEngine.deliver(ModuleRevisionId, String, String,
DeliverOptions) method, in step #3.  Using SVN revision 811164, the line at 159 is:
>       String rev = (String) resolvedRevisions.get(dependencies[i].getDependencyRevisionId());
>             if (rev == null) {
>                 rev = dependencies[i].getDependencyRevisionId().getRevision();
>             }
> There are two ModuleRevisionId objects, one in the map and one in the DependencyDescriptor
but they have different extra attributes.  The one in the DependencyDescriptor includes the
namespace on the extra attribute while the one in the map does not.  Hence the lookup in the
map is a miss so the failover action is to use the revision out of the DependencyDescriptor
objects ModuleRevisionId, which is a dynamic revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message