gnodet commented on code in PR #595:
URL: https://github.com/apache/maven-resolver/pull/595#discussion_r1818176427


##########
maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/AbstractDependencyManager.java:
##########
@@ -229,37 +231,46 @@ public DependencyManagement manageDependency(Dependency 
dependency) {
                 }
             }
 
+            // system scope paths always applied to have them aligned
+            // (same artifact > same path) in whole graph

Review Comment:
   why isn't system scope applied locally by ModelBuilder ?



##########
maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/AbstractDependencyManager.java:
##########
@@ -229,37 +231,46 @@ public DependencyManagement manageDependency(Dependency 
dependency) {
                 }
             }
 
+            // system scope paths always applied to have them aligned
+            // (same artifact > same path) in whole graph
             if (systemDependencyScope != null
-                    && (systemDependencyScope.is(scope)
+                    && (scope != null && 
systemDependencyScope.is(scope.getValue())
                             || (scope == null && 
systemDependencyScope.is(dependency.getScope())))) {
-                String localPath = managedLocalPaths.get(key);
+                Holder<String> localPath = managedLocalPaths.get(key);
                 if (localPath != null) {
                     if (management == null) {
                         management = new DependencyManagement();
                     }
                     Map<String, String> properties =
                             new 
HashMap<>(dependency.getArtifact().getProperties());
-                    systemDependencyScope.setSystemPath(properties, localPath);
+                    systemDependencyScope.setSystemPath(properties, 
localPath.getValue());
                     management.setProperties(properties);
                 }
             }
 
-            Boolean optional = managedOptionals.get(key);
+            // optional is not managed by model builder
+            // if rule exists, apply it

Review Comment:
   why isn't `optional` managed by model builder ?
   And why don't we consider the depth for managing optional ?



-- 
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