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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to