You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by "Johannes Stamminger (JIRA)" <ji...@apache.org> on 2007/06/25 16:22:25 UTC

[jira] Created: (IVY-537) Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions

Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions
--------------------------------------------------------------------------------------------------------------------------

                 Key: IVY-537
                 URL: https://issues.apache.org/jira/browse/IVY-537
             Project: Ivy
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.4.1
            Reporter: Johannes Stamminger


With moduleA referencing libX-1.0 with:

        <dependency name="libX" rev="1.0" org="COTS" conf="compile, 
development, deployment">
            <artifact name="libX" conf="compile"/>
            <artifact name="LICENSE" type="license" ext="txt" 
conf="deployment"/>
            <artifact name="libX" type="source" ext="src.jar" 
conf="development"/>
        </dependency>


and another module referencing same libX but in version 2.0 by way of:

        <dependency name="libX" rev="2.0" org="COTS" conf="compile, 
development, deployment">
            <artifact name="libX" conf="compile"/>
            <artifact name="libX" type="license" ext="jar.license" 
conf="deployment"/>
            <artifact name="libX" type="source" ext="src.jar" 
conf="development"/>
        </dependency>


the eviction of libX-1.0 fails (note the different namings for the license 
artifact).

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


[jira] Commented: (IVY-537) Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions

Posted by "Johannes Stamminger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508197 ] 

Johannes Stamminger commented on IVY-537:
-----------------------------------------

OK, I see your point. And the more I think about it, I believe the current behaviour in 1.4.1 to be the correct one - to fail (and therefore to be false in 2.0.x currently).

In my special situation (it is a license file that was renamed) then an explicite exclude definition in my dependency to moduleB would be appropriate. Unfortunately the exclude seems to work only for a whole module. More detailed exclusions (by type, name, ...) are not regarded and the resolve fails again :-(. But I will go into that more deep tomorrow.


btw: just extract my attached example ant type 'ant' - then you get dependencies reports/graphs in a new subdir build/dependencies. The most interesting ones are those concerning the deployment configuration.

> Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-537
>                 URL: https://issues.apache.org/jira/browse/IVY-537
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.4.1
>            Reporter: Johannes Stamminger
>         Attachments: ivy-lib-eviction.zip
>
>
> With moduleA referencing libX-1.0 with:
>         <dependency name="libX" rev="1.0" org="COTS" conf="compile, 
> development, deployment">
>             <artifact name="libX" conf="compile"/>
>             <artifact name="LICENSE" type="license" ext="txt" 
> conf="deployment"/>
>             <artifact name="libX" type="source" ext="src.jar" 
> conf="development"/>
>         </dependency>
> and another module referencing same libX but in version 2.0 by way of:
>         <dependency name="libX" rev="2.0" org="COTS" conf="compile, 
> development, deployment">
>             <artifact name="libX" conf="compile"/>
>             <artifact name="libX" type="license" ext="jar.license" 
> conf="deployment"/>
>             <artifact name="libX" type="source" ext="src.jar" 
> conf="development"/>
>         </dependency>
> the eviction of libX-1.0 fails (note the different namings for the license 
> artifact).

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


[jira] Commented: (IVY-537) Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions

Posted by "Xavier Hanin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508200 ] 

Xavier Hanin commented on IVY-537:
----------------------------------

Yes, your example is pretty easy to run, but I prefer to migrate such examples to junit test, because it's easier to enter in debug mode in a junit test, and because adding a junit test before fixing a bug is necessary anyway.

> Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-537
>                 URL: https://issues.apache.org/jira/browse/IVY-537
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.4.1
>            Reporter: Johannes Stamminger
>         Attachments: ivy-lib-eviction.zip
>
>
> With moduleA referencing libX-1.0 with:
>         <dependency name="libX" rev="1.0" org="COTS" conf="compile, 
> development, deployment">
>             <artifact name="libX" conf="compile"/>
>             <artifact name="LICENSE" type="license" ext="txt" 
> conf="deployment"/>
>             <artifact name="libX" type="source" ext="src.jar" 
> conf="development"/>
>         </dependency>
> and another module referencing same libX but in version 2.0 by way of:
>         <dependency name="libX" rev="2.0" org="COTS" conf="compile, 
> development, deployment">
>             <artifact name="libX" conf="compile"/>
>             <artifact name="libX" type="license" ext="jar.license" 
> conf="deployment"/>
>             <artifact name="libX" type="source" ext="src.jar" 
> conf="development"/>
>         </dependency>
> the eviction of libX-1.0 fails (note the different namings for the license 
> artifact).

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


[jira] Commented: (IVY-537) Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions

Posted by "Johannes Stamminger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508151 ] 

Johannes Stamminger commented on IVY-537:
-----------------------------------------

I'm quite sure to have located this problems cause: in fr.jayasoft.ivy.IvyNode#loadData(String, boolean) at the very end there is a call

addDependencyArtifactsIncludes(_rootModuleConf, getDependencyArtifactsIncludes(getParentConf());

This should be done only if the current node is not evicted:

        if (!isEvicted(_rootModuleConf)) {
            DependencyDescriptor dd = getDependencyDescriptor(getParent());
            if (dd != null) {
                addDependencyArtifactsIncludes(_rootModuleConf, getDependencyArtifactsIncludes(getParentConf()));
            }
        }


> Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-537
>                 URL: https://issues.apache.org/jira/browse/IVY-537
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.4.1
>            Reporter: Johannes Stamminger
>         Attachments: ivy-lib-eviction.zip
>
>
> With moduleA referencing libX-1.0 with:
>         <dependency name="libX" rev="1.0" org="COTS" conf="compile, 
> development, deployment">
>             <artifact name="libX" conf="compile"/>
>             <artifact name="LICENSE" type="license" ext="txt" 
> conf="deployment"/>
>             <artifact name="libX" type="source" ext="src.jar" 
> conf="development"/>
>         </dependency>
> and another module referencing same libX but in version 2.0 by way of:
>         <dependency name="libX" rev="2.0" org="COTS" conf="compile, 
> development, deployment">
>             <artifact name="libX" conf="compile"/>
>             <artifact name="libX" type="license" ext="jar.license" 
> conf="deployment"/>
>             <artifact name="libX" type="source" ext="src.jar" 
> conf="development"/>
>         </dependency>
> the eviction of libX-1.0 fails (note the different namings for the license 
> artifact).

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


[jira] Updated: (IVY-537) Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions

Posted by "Johannes Stamminger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johannes Stamminger updated IVY-537:
------------------------------------

    Attachment: ivy-lib-eviction.zip

ivy-lib-eviction.zip: example for the different evictions: working for libY and moduleA but not for libX (does not fail due to all-conflict managere specified in moduleC's ivy.xml)

> Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-537
>                 URL: https://issues.apache.org/jira/browse/IVY-537
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.4.1
>            Reporter: Johannes Stamminger
>         Attachments: ivy-lib-eviction.zip
>
>
> With moduleA referencing libX-1.0 with:
>         <dependency name="libX" rev="1.0" org="COTS" conf="compile, 
> development, deployment">
>             <artifact name="libX" conf="compile"/>
>             <artifact name="LICENSE" type="license" ext="txt" 
> conf="deployment"/>
>             <artifact name="libX" type="source" ext="src.jar" 
> conf="development"/>
>         </dependency>
> and another module referencing same libX but in version 2.0 by way of:
>         <dependency name="libX" rev="2.0" org="COTS" conf="compile, 
> development, deployment">
>             <artifact name="libX" conf="compile"/>
>             <artifact name="libX" type="license" ext="jar.license" 
> conf="deployment"/>
>             <artifact name="libX" type="source" ext="src.jar" 
> conf="development"/>
>         </dependency>
> the eviction of libX-1.0 fails (note the different namings for the license 
> artifact).

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


[jira] Commented: (IVY-537) Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions

Posted by "Xavier Hanin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508169 ] 

Xavier Hanin commented on IVY-537:
----------------------------------

I haven't had time to convert your example to a unit test to actually debug the problem, so my understanding may not be accurate. From my point of view your fix will cause other problems (maybe some unit test failures). 

Indeed the problem raised by this issue is not easy to solve, because it's difficult to know what is the best policy to adopt. Indeed, in some cases some may prefer the dependency artifact definition to be used against the new version, and in other cases you don't. Let's say that libX publish two artifacts: A and B, both in revision 1.0 and 1.1. Now if I have those two dependencies:
{code}
<dependency name="libX" rev="1.0">
  <artifact name="A" />
</dependency>
{code}
and in another module:
{code}
<dependency name="libX" rev="1.1">
  <artifact name="B" />
</dependency>
{code}
Then I expect Ivy to take libX 1.1 with both artifacts A and B. Right? At least I think it's how Ivy tries to work. Now a problem occur if the artifact A is not published in revision 1.1. I think in this case Ivy should simply output a warning (or provide a pluggable policy for handling this).

So, what do you think?

> Eviction fails for libs not providing their ivy configuration and providing artifacts named different between lib versions
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-537
>                 URL: https://issues.apache.org/jira/browse/IVY-537
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.4.1
>            Reporter: Johannes Stamminger
>         Attachments: ivy-lib-eviction.zip
>
>
> With moduleA referencing libX-1.0 with:
>         <dependency name="libX" rev="1.0" org="COTS" conf="compile, 
> development, deployment">
>             <artifact name="libX" conf="compile"/>
>             <artifact name="LICENSE" type="license" ext="txt" 
> conf="deployment"/>
>             <artifact name="libX" type="source" ext="src.jar" 
> conf="development"/>
>         </dependency>
> and another module referencing same libX but in version 2.0 by way of:
>         <dependency name="libX" rev="2.0" org="COTS" conf="compile, 
> development, deployment">
>             <artifact name="libX" conf="compile"/>
>             <artifact name="libX" type="license" ext="jar.license" 
> conf="deployment"/>
>             <artifact name="libX" type="source" ext="src.jar" 
> conf="development"/>
>         </dependency>
> the eviction of libX-1.0 fails (note the different namings for the license 
> artifact).

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