[ https://issues.apache.org/jira/browse/IVY-871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16270913#comment-16270913 ]
Martin commented on IVY-871: ---------------------------- [~jaikiran], thx for your detailed explanation. But one thing that I do not understand is why in my defined version matcher is returning the latest revision. So imagine I have the following versions for mylib: 1.2.3, 1.2.4, 1.2.5-17.4, 1.3.0-17.4, 1.3.0 if I pull now `mylib` with `latestRel(17.4)` it will return `1.3.0-17.4`. The question is only why does it work? I have just defined a regular expression to match this pattern but I do not say anywhere that it should return me the latest one. > test and document PatternVersionMatcher > --------------------------------------- > > Key: IVY-871 > URL: https://issues.apache.org/jira/browse/IVY-871 > Project: Ivy > Issue Type: Improvement > Components: Core > Reporter: Xavier Hanin > Assignee: Maarten Coene > Fix For: 2.1.0-RC2 > > Attachments: patch.txt > > > There is a powerful version matcher in Ivy code base called > PatternVersionMatcher. Unfortunately, this matcher is not documented, not > tested, and not declared in the default typedef.properties. Nobody remembers > where it comes from, but code analysis should be enough to understand how it > works and what it can achieve. > Here's what I understand from a quick analysis: > {code:title=settings.xml} > <pattern-vm> > <match revision="micro" pattern="${major}\.${minor}\.\d+" args="major, > minor" matcher="regexp" /> > </pattern-vm> > {code} > {code:title=ivy.xml} > <dependency org="acme" name="foo" rev="micro(1, 3)" /> > {code} > If I understand correctly the code, this will match any revision like > 1.3.<any number>. -- This message was sent by Atlassian JIRA (v6.4.14#64029)