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 Xavier Hanin <xa...@gmail.com> on 2008/05/05 13:24:48 UTC

Re: Version dependencies

On Tue, Apr 29, 2008 at 11:40 PM, Archie Cobbs <ar...@dellroad.org> wrote:

> I have a question about revision dependencies and precisely how the "+"
> wildcard works.... e.g., in a dependency like this:
>
>        <dependency conf="default->apis,impl" org="org.apache.xerces"
> name="xerces" rev="2.5+"/>
>
> I think the best way to ask the question is with a little true/false quiz
> :-)
>
> Does rev="2.5+" match "2.5.3" ?

y

>
> Does rev="2.5+" match "2.6" ?

n

>
> Does rev="2.5+" match "3.0" ?

n

>
> Does rev="2.5.+" match "2.5.3" ?

y

>
> Does rev="2.5.+" match "2.6" ?

n

>
> Does rev="2.5.+" match "3.0" ?

n

I know the syntax is confusing, but the + versions can be read as "starts
with?". If you need more powerful stuff, use version ranges.

Xavier


>
> Thanks,
> -Archie
>
> --
> Archie L. Cobbs
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Re: Version dependencies

Posted by Xavier Hanin <xa...@gmail.com>.
On Mon, May 5, 2008 at 2:30 PM, Niklas Matthies <ml...@nmhq.net>
wrote:

> On Mon 2008-05-05 at 13:24h, Xavier Hanin wrote on ivy-user:
> > On Tue, Apr 29, 2008 at 11:40 PM, Archie Cobbs <ar...@dellroad.org>
> wrote:
> :
> > > Does rev="2.5+" match "2.5.3" ?
> :
> > I know the syntax is confusing, but the + versions can be read as
> "starts
> > with?". If you need more powerful stuff, use version ranges.
>
> Any chance of adding a version matcher for the JSR-277 (draft) version
> range syntax? I find that one to be pretty intuitive.

Adding such a version matcher would be pretty easy. The main problem IMO
would be to distinguish the syntax from others (Ivy deduces the version
matcher from the version only, there is no additional parameter). Maybe we
could use a prefix or suffix to the official syntax. Feel free to open an
issue in JIRA, and even contribute a patch if you like :-)

Xavier


>
>
> -- Niklas Matthies
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Re: Version dependencies

Posted by Niklas Matthies <ml...@nmhq.net>.
On Mon 2008-05-05 at 13:24h, Xavier Hanin wrote on ivy-user:
> On Tue, Apr 29, 2008 at 11:40 PM, Archie Cobbs <ar...@dellroad.org> wrote:
:
> > Does rev="2.5+" match "2.5.3" ?
:
> I know the syntax is confusing, but the + versions can be read as "starts
> with?". If you need more powerful stuff, use version ranges.

Any chance of adding a version matcher for the JSR-277 (draft) version
range syntax? I find that one to be pretty intuitive.

-- Niklas Matthies