You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by "Brown, Carlton" <Ca...@compucredit.com> on 2009/07/10 14:54:42 UTC

revConstraint doesn't constrain with latest.integration

Hi all,

It appears to me that revision constraint is not respected when a forced
resolver is encountered.   

Given a dependency on a module "widget" defined as follows:
<dependency org="com.company" name="widget" rev="latest.integration"
revConstraint="3.0.+" changing="true"  conf="default->site"/>

If my fs repository contains versions 3.0.19.1 and 3.1-SNAPSHOT, I
expect the 3.0.19.1 to be resolved.    

But the observed behavior is that Ivy resolves 3.1-SNAPHOT.

Why is this?  I expected that the 3.0.+ revConstraint would exclude any
revision beginning with 3.1.    

Thanks in advance,
Carlton




====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the 
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on 
the contents of this message is prohibited. In such
case please notify us and destroy and delete all 
copies of this transmission.  Thank you.
====================================================

RE: revConstraint doesn't constrain with latest.integration

Posted by "Brown, Carlton" <Ca...@compucredit.com>.
It was a problem with my understanding, specifically in 2 areas:

1)  The attributes 'rev' and 'revConstraint' do not create a combined constraint.  They are mutually exclusive depending on the type of resolve.
2)  When you use 'forced' on a resolver, it overrides the specified rev attribute with 'latest.integration' for that resolver (if the artifact exists in the forced resolver).

Also, in a delivered ivy file, 'rev' is set to whatever version actually was resolved, and 'revConstraint' becomes whatever constraint (rev or revConstraint) was used during resolution.

I think this is a good idea and I understand the logic, but the semantics are quite confusing.

-----Original Message-----
From: Geoff Clitheroe [mailto:g.clitheroe@gmail.com] 
Sent: Friday, July 10, 2009 3:50 PM
To: ivy-user@ant.apache.org
Subject: Re: revConstraint doesn't constrain with latest.integration

Hi,

I think rev="latest.integration" is letting it include SNAPSHOT.  You could try either deleting revConstraint and changing rev to rev="3.0.+"  or leaving revConstraint as is and setting rev="latest.release"

If you can try this I'd be interested to know the answer - the documentation is thin on the statuses page:
http://ant.apache.org/ivy/history/2.1.0-rc1/settings/statuses.html

Cheers,
Geoff


On Sat, Jul 11, 2009 at 12:54 AM, Brown, Carlton<Ca...@compucredit.com> wrote:
> Hi all,
>
> It appears to me that revision constraint is not respected when a 
> forced resolver is encountered.
>
> Given a dependency on a module "widget" defined as follows:
> <dependency org="com.company" name="widget" rev="latest.integration"
> revConstraint="3.0.+" changing="true"  conf="default->site"/>
>
> If my fs repository contains versions 3.0.19.1 and 3.1-SNAPSHOT, I 
> expect the 3.0.19.1 to be resolved.
>
> But the observed behavior is that Ivy resolves 3.1-SNAPHOT.
>
> Why is this?  I expected that the 3.0.+ revConstraint would exclude 
> any revision beginning with 3.1.
>
> Thanks in advance,
> Carlton
>
>
>
>
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL information that is 
> intended only for use by the named recipient. If you are not the named 
> recipient, any disclosure, dissemination, or action based on the 
> contents of this message is prohibited. In such case please notify us 
> and destroy and delete all copies of this transmission.  Thank you.
> ====================================================

Re: revConstraint doesn't constrain with latest.integration

Posted by Geoff Clitheroe <g....@gmail.com>.
Hi,

I think rev="latest.integration" is letting it include SNAPSHOT.  You
could try either deleting revConstraint
and changing rev to rev="3.0.+"  or leaving revConstraint as is and
setting rev="latest.release"

If you can try this I'd be interested to know the answer - the
documentation is thin on the statuses page:
http://ant.apache.org/ivy/history/2.1.0-rc1/settings/statuses.html

Cheers,
Geoff


On Sat, Jul 11, 2009 at 12:54 AM, Brown,
Carlton<Ca...@compucredit.com> wrote:
> Hi all,
>
> It appears to me that revision constraint is not respected when a forced
> resolver is encountered.
>
> Given a dependency on a module "widget" defined as follows:
> <dependency org="com.company" name="widget" rev="latest.integration"
> revConstraint="3.0.+" changing="true"  conf="default->site"/>
>
> If my fs repository contains versions 3.0.19.1 and 3.1-SNAPSHOT, I
> expect the 3.0.19.1 to be resolved.
>
> But the observed behavior is that Ivy resolves 3.1-SNAPHOT.
>
> Why is this?  I expected that the 3.0.+ revConstraint would exclude any
> revision beginning with 3.1.
>
> Thanks in advance,
> Carlton
>
>
>
>
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL
> information that is intended only for use by the
> named recipient. If you are not the named recipient,
> any disclosure, dissemination, or action based on
> the contents of this message is prohibited. In such
> case please notify us and destroy and delete all
> copies of this transmission.  Thank you.
> ====================================================

RE: revConstraint doesn't constrain with latest.integration

Posted by Alex Zhukov <al...@hotmail.com>.
Carlton,

It depends on how you ivy:resolve this artifact. To pick up the 'latest.integration' artifact it needs to be published with revision set to 'latest.integration' first, and when you ivy:resolve it you need to set resolveMode="dynamic".

Aleksey  

> Subject: revConstraint doesn't constrain with latest.integration
> Date: Fri, 10 Jul 2009 08:54:42 -0400
> From: Carlton.Brown@compucredit.com
> To: ivy-user@ant.apache.org
> 
> Hi all,
> 
> It appears to me that revision constraint is not respected when a forced
> resolver is encountered.   
> 
> Given a dependency on a module "widget" defined as follows:
> <dependency org="com.company" name="widget" rev="latest.integration"
> revConstraint="3.0.+" changing="true"  conf="default->site"/>
> 
> If my fs repository contains versions 3.0.19.1 and 3.1-SNAPSHOT, I
> expect the 3.0.19.1 to be resolved.    
> 
> But the observed behavior is that Ivy resolves 3.1-SNAPHOT.
> 
> Why is this?  I expected that the 3.0.+ revConstraint would exclude any
> revision beginning with 3.1.    
> 
> Thanks in advance,
> Carlton
> 
> 
> 
> 
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL
> information that is intended only for use by the 
> named recipient. If you are not the named recipient,
> any disclosure, dissemination, or action based on 
> the contents of this message is prohibited. In such
> case please notify us and destroy and delete all 
> copies of this transmission.  Thank you.
> ====================================================

_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009