Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7960

Artifact collection filtering

    XMLWordPrintableJSON

Details

    Description

      Exposed work from MRESOLVER-451 and MRESOLVER-460: allow for various filterings.

      User should be able to "tune" range processing. Also, as this affects resolution, ideally these "tuned" parameters should be stored along project, especially if project relies on these (ie. in .mvn/maven.config).

      Explanation: Maven is notoriously "bad" when ranges are being used. Hence, this issue introduces (range) version filtering support. The configuration accepts an "expression" (CSV) of filters. Supported filters are:

      • "h" (equivalent of "h(1)") or "h(N)" - that selects "top N" versions from range
      • "l" (equivalent of "l(1)") or "l(N)" - that selects "bottom N" versions from range
      • "s" snapshot filter: if root/project is snapshot, will allow snapshots in ranges, otherwise snapshot versions are filtered out (also see Resolver config aether.snapshotFilter present in Resolver 1.x but has no effect in Maven3 as it is not used).
      • "e(G:A:V)" exclusion, if range for G:A is processed, V is excluded from range. V can be version range as well, then whole range is excluded.

      The built expressions are evaluated in-order, and filtering effect is accumulated. Hence, expression like "h(5),l" will return 5th highest version, etc.

      This depends on resolver release.

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              cstamas Tamas Cservenak
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: