You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Xavier Hanin (JIRA)" <ji...@apache.org> on 2008/04/05 10:27:27 UTC

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

    [ https://issues.apache.org/jira/browse/IVY-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585926#action_12585926 ] 

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

While thinking more about the problem, I wonder if the solution I've implemented is the good one. Ivy used to consider artifact and include the same way, but this is no longer the case. artifact can be used to declare artifacts for dependencies which don't have metadata, or metadata with missing artifacts declaration. Include can be used when you want to limit the artifacts you get for a dependency, often because the dependency doesn't provide the fine grain configuration you want. 

So if I come back to my example where merge is required, I now think that to be really clean one should declare dependencies like this:
{noformat}
<dependency name="libX" rev="1.0">
  <artifact name="A" />
  <artifact name="B" />
  <include name="A" />
</dependency>
{noformat}

and in another module:
{noformat}
<dependency name="libX" rev="1.1">
  <artifact name="A" />
  <artifact name="B" />
  <include name="B" />
</dependency>
{noformat}

Then no merging of artifact declaration would be necessary on eviction, only merge of includes. 

But can we really expect this? When used to declare missing artifacts on a module which has its own metadata, most probably people who don't need this additional artifacts won't make think about declaring it. So I can end up in a situation where I have:
{noformat}
<dependency name="libX" rev="1.0">
  <artifact name="A" />
</dependency>
{noformat}

and in another module
{noformat}
<dependency name="libX" rev="1.1" />
{noformat}

When libX;1.0 is evicted, I still want to get artifact A if it is available in 1.1

So maybe the solution is good enough. Maybe I should only move the message about missing artifacts to a lower level (info instead of warn).

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
>            Assignee: Xavier Hanin
>             Fix For: 2.0-RC1
>
>         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.