[ https://issues.apache.org/jira/browse/MNG-7960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tamas Cservenak updated MNG-7960: --------------------------------- 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. was: 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. > Artifact collection filtering > ----------------------------- > > Key: MNG-7960 > URL: https://issues.apache.org/jira/browse/MNG-7960 > Project: Maven > Issue Type: New Feature > Components: Artifacts and Repositories > Reporter: Tamas Cservenak > Assignee: Tamas Cservenak > Priority: Major > Fix For: 4.0.0, 4.0.0-alpha-12 > > > 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)