You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "cstamas (via GitHub)" <gi...@apache.org> on 2023/12/19 10:52:35 UTC
[PR] [MNG-7960] Version filtering [maven]
cstamas opened a new pull request, #1353:
URL: https://github.com/apache/maven/pull/1353
Make Maven more friendly (and tunable) when ranges are being used. There new options are merely affecting range processing, allowing different narrowing strategies.
Not fully done: depends on
https://github.com/apache/maven-resolver/pull/401
---
https://issues.apache.org/jira/browse/MNG-7960
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-7960] Artifact collection filtering [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas merged PR #1353:
URL: https://github.com/apache/maven/pull/1353
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-7960] Version filtering [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #1353:
URL: https://github.com/apache/maven/pull/1353#discussion_r1433547141
##########
maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java:
##########
@@ -406,6 +443,75 @@ public SessionBuilder newRepositorySessionBuilder(MavenExecutionRequest request)
return session;
}
+ private VersionFilter buildVersionFilter(Map<Object, Object> configProps) {
+ ArrayList<VersionFilter> filters = new ArrayList<>();
+ String filterExpression = (String) configProps.get(MAVEN_VERSION_FILTERS);
+ if (filterExpression != null) {
+ List<String> expressions = Arrays.stream(filterExpression.split(","))
+ .filter(s -> s != null && !s.trim().isEmpty())
+ .collect(Collectors.toList());
+ for (String expression : expressions) {
+ if ("h".equals(expression)) {
+ filters.add(new HighestVersionFilter());
+ } else if (expression.startsWith("h(") && expression.endsWith(")")) {
+ int num = Integer.parseInt(expression.substring(2, expression.length() - 1));
+ // MRESOLVER-450
+ // filters.add(new HighestVersionFilter(num));
Review Comment:
I think it's https://github.com/apache/maven-resolver/pull/401 / MRESOLVER-460.
This PR should be moved to draft to avoid anyone forgetting it's not finished and we need next resolver alpha.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-7960] Version filtering [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #1353:
URL: https://github.com/apache/maven/pull/1353#discussion_r1448593270
##########
pom.xml:
##########
@@ -176,7 +176,7 @@ under the License.
<plexusInterpolationVersion>1.26</plexusInterpolationVersion>
<plexusTestingVersion>1.0.0</plexusTestingVersion>
<plexusXmlVersion>4.0.1</plexusXmlVersion>
- <resolverVersion>2.0.0-alpha-5</resolverVersion>
+ <resolverVersion>2.0.0-alpha-6</resolverVersion>
Review Comment:
Should that be in a separate commit for clarity and release notes ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-7960] Version filtering [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #1353:
URL: https://github.com/apache/maven/pull/1353#issuecomment-1864308325
This PR depends on new Resolver alpha release.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MNG-7960] Version filtering [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #1353:
URL: https://github.com/apache/maven/pull/1353#discussion_r1448657055
##########
pom.xml:
##########
@@ -176,7 +176,7 @@ under the License.
<plexusInterpolationVersion>1.26</plexusInterpolationVersion>
<plexusTestingVersion>1.0.0</plexusTestingVersion>
<plexusXmlVersion>4.0.1</plexusXmlVersion>
- <resolverVersion>2.0.0-alpha-5</resolverVersion>
+ <resolverVersion>2.0.0-alpha-6</resolverVersion>
Review Comment:
There is a separate PR just for the update https://github.com/apache/maven/pull/1373 (and removal of some deprecation warnings in tests)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org