You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Jason Trump (JIRA)" <ji...@apache.org> on 2007/12/16 19:29:43 UTC

[jira] Commented: (IVY-160) Duplicate dependency entries within one Ivy-File not resolved correctly

    [ https://issues.apache.org/jira/browse/IVY-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552266 ] 

Jason Trump commented on IVY-160:
---------------------------------

Maybe there are two different ways to do what Nils is trying to do, both using configurations.

It looks like he is trying to create two configurations of foo#bar in the dependency definition -- one configuration for runtime and one for compile-time.  So if he has control of foo#bar's ivy.xml, he should set it up that way:
  
<ivy-module> 
   <info organisation="foo" module="bar" revision="1.2.1" status="release"/>
   <configurations>
      <conf name="compile"/>
      <conf name="runtime"/>
   </configurations>
   <publications>
      <artifact name="okra" type="jar" conf="runtime"/>
      <artifact name="gumbo" type="jar" conf="compile"/>
   </publications>
</ivy-module>

Then his configuration just looks like

   <dependency org="foo" name="bar" rev="1.2.1" conf="compile,runtime"/>

Even if he doesn't have control over foo#bar's ivy.xml, wouldn't this do what he wants:

  <dependency org="foo" name="bar" rev="1.2.1">
      <artifact name="okra" type="jar" conf="runtime"/>
      <artifact name="gumbo" type="jar" conf="compile"/>
  </dependency>

?

> Duplicate dependency entries within one Ivy-File not resolved correctly
> -----------------------------------------------------------------------
>
>                 Key: IVY-160
>                 URL: https://issues.apache.org/jira/browse/IVY-160
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 1.2, 1.3-RC1
>         Environment: OS Windows
>            Reporter: Nils Tegtmeier
>            Assignee: Xavier Hanin
>            Priority: Minor
>             Fix For: 2.0
>
>
> If an ivy.xml contains more than one <dependency>-entry for the same organisation and module, only one of them is resolved correctly. This issue showed itself in two different flavors:
> a)
> Suppose you have two subsequent entries for identical configurations like this:
>       <dependency org="foo" name="bar" rev="1.5+" >
>       	<conf name="runtime">
>       		<mapped name="*" />
>       	</conf>
>       	<artifact name="gumbo" type="zip" />
>       </dependency>      
>       <dependency org="foo" name="bar" rev="1.5+">
>       	<conf name="runtime">
>       		<mapped name="*" />
>       	</conf>
>       	<artifact name="okra" type="jar"/>
>       </dependency>            
> Then the first is resolved and retrieved while the second is not.
> b)
> Suppose you have two subsequent entries for different configurations like this:
>       <dependency org="foo" name="bar" rev="1.2.1">
>         <conf name="compile">
>           <mapped name="*"/>
>         </conf>
>       	<artifact name="gumbo" type="jar"/>
>       </dependency>
>       <dependency org="foo" name="bar" rev="1.2.1">
>         <conf name="runtime">
>           <mapped name="*"/>
>         </conf>
>       	<artifact name="okra" type="jar"/>
>       </dependency>
> Then both are resolved to the configuration of the first entry if you call <ivy:resolve file="/ivy.xml" conf="*"/>

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