Ivy
  1. Ivy
  2. IVY-871

test and document PatternVersionMatcher

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0-RC2
    • Component/s: Core
    • Labels:
      None

      Description

      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:

      settings.xml
      <pattern-vm>
        <match revision="micro" pattern="${major}\.${minor}\.\d+" args="major, minor" matcher="regexp" />
      </pattern-vm>
      
      ivy.xml
      <dependency org="acme" name="foo" rev="micro(1, 3)" />
      

      If I understand correctly the code, this will match any revision like 1.3.<any number>.

      1. patch.txt
        7 kB
        Jon Schneider

        Activity

        Hide
        Maarten Coene added a comment -

        I've applied your patch. Thanks a lot for the contribution.
        Maarten

        Show
        Maarten Coene added a comment - I've applied your patch. Thanks a lot for the contribution. Maarten
        Hide
        Jon Schneider added a comment -

        Documentation and test case attached. Let me know if there are any problems with the patch formatting.

        Thanks,
        Jon

        Show
        Jon Schneider added a comment - Documentation and test case attached. Let me know if there are any problems with the patch formatting. Thanks, Jon

          People

          • Assignee:
            Maarten Coene
            Reporter:
            Xavier Hanin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development