ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Matthies <>
Subject Version Pattern Matcher
Date Thu, 23 Jul 2009 23:59:13 GMT
The new Version Pattern Matcher effectively provides a macro-like
functionality for version constraints. This macro facility would be
useful regardless of the version constraint syntax, it could "wrap"
any of the other version matchers (or even itself).

In fact, aren't version matchers and pattern matchers conceptually the
same? Both represent predicates on strings, right? So it would make
sense to give version matchers identifiers (typedefs) so they can play
the role of pattern matchers, like "regexp" etc.

Changing the "pattern-vm" syntax slightly to emphasize the macro
functionality, one could for example have:

        <macro name="atMost" args="max"
               expansion="(,max]" matcher="range" />

And use it like:

    <dependency org="acme" name="tool" rev="atMost(3.0)" />

The example assumes that the Version Range Matcher is available as a
pattern matcher via the typedef "range".

What do you think?

-- Niklas Matthies

View raw message