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

Xavier Hanin resolved IVY-745.
------------------------------

    Resolution: Fixed

I've fixed the problem and added unit tests for two things. Now if extra 
attributes in dependency declaration is inconsistent with module descriptor, 
then:
* it will raise an error during consistency check, so that a clear error 
message is displayed
* with consistency checking disabled, it works without any strange eviction or 
module not found

> Unwanted eviction of dependencies when optional attributes  in dependency and 
> info tags are in consistent 
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-745
>                 URL: https://issues.apache.org/jira/browse/IVY-745
>             Project: Ivy
>          Issue Type: Improvement
>         Environment: Fedora 7 (i386), Java 1.5.0_10, apache-ivy-2.0.0-beta1, 
> Ant 1.6.5
>            Reporter: Vasco Lemoine
>            Assignee: Xavier Hanin
>            Priority: Minor
>             Fix For: 2.0-RC1
>
>
> I introduced a extra attribute which I am using for building of
> submodules.
> foo-ivy.xml:
> <ivy-module version='2.0'>
>   <info organisation='foo' module='foo' revision='1' />
>   <configurations>
>     <include file='${build_home}/etc/ivy/ivy-configurations.xml' />
>   </configurations>
>   <publications />
>   <dependencies>
>     <dependency org='bar' name='bar' rev='trunk' submodule='bar' />
>   </dependencies>
> </ivy-module>
> bar-ivy.xml:
> <ivy-module version='2.0'>
>   <info organisation='bar' module='bar' revision='1' />
>   <configurations>
>     <include file='${build_home}/etc/ivy/ivy-configurations.xml' />
>   </configurations>
>   <publications />
>   <dependencies>
>         <dependency org='foobar' name='foobar' rev='1' />
>   </dependencies>
> </ivy-module>
> Because the submodule attribute was missing in the bar-ivy.xml <info>
> tag. The foobar dependency gets evicted. I'm not sure this is expected
> behavior. If not it is probably a bug or at least the provided
> information is not clear enough to troubleshoot. Of course the work
> around is adding the extra attribute to the info tag:
>      
> <ivy-module version='2.0'>
>   <info organisation='bar' module='bar' revision='1' submodule='bar' />
>   <configurations>
>     <include file='${build_home}/etc/ivy/ivy-configurations.xml' />
>   </configurations>
>   <publications />
>   <dependencies>
>         <dependency org='foobar' name='foobar' rev='1' />
>   </dependencies>
> </ivy-module>

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

Reply via email to