Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
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
- fixes
-
MRESOLVER-164 DefaultDependencyCollector filterVersions seems always return full version range
- Closed
-
MNG-7049 Version range resolution downloads all poms, not just the highest version
- Open
-
MNG-6049 Add behavior to filter resolved version ranges of an artifact
- Reopened
- relates to
-
MNG-3092 Resolution of version ranges with non-snapshot bounds can resolve to a snapshot version
- Reopened
- links to