cstamas commented on code in PR #595: URL: https://github.com/apache/maven-resolver/pull/595#discussion_r1818181684
########## 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: I don't know, but model builder method for managing optional is empty. Unsure about reasons. And we don't consider depth for optional due that above: as model builder is not managing it (so it applied even "onto itself"). -- 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