cstamas commented on code in PR #595:
URL: https://github.com/apache/maven-resolver/pull/595#discussion_r1819800234
##########
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:
No, am saying that model builder is NOT managing it, and resolver dependency
manager WAS managing it (classic, and now transitive as well).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]