cstamas commented on code in PR #428:
URL: https://github.com/apache/maven-resolver/pull/428#discussion_r1487436991
##########
maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/manager/AbstractDependencyManager.java:
##########
@@ -199,25 +199,27 @@ public DependencyManagement manageDependency(Dependency
dependency) {
}
management.setScope(scope);
- if (!systemScopePredicate.test(scope)
- &&
dependency.getArtifact().getProperty(ArtifactProperties.LOCAL_PATH, null) !=
null) {
+ if (!systemScopeHandler.isSystemScope(scope)
+ && systemScopeHandler.getSystemPath(
+
dependency.getArtifact().getProperties())
+ != null) {
Map<String, String> properties =
new
HashMap<>(dependency.getArtifact().getProperties());
- properties.remove(ArtifactProperties.LOCAL_PATH);
+ systemScopeHandler.setSystemPath(properties, null);
management.setProperties(properties);
}
}
- if ((systemScopePredicate.test(scope))
- || (scope == null &&
systemScopePredicate.test(dependency.getScope()))) {
+ if ((systemScopeHandler.isSystemScope(scope))
+ || (scope == null &&
systemScopeHandler.isSystemScope(dependency.getScope()))) {
String localPath = managedLocalPaths.get(key);
Review Comment:
systemScopeHandler is session scoped, while managedLocalPaths is per mgr,
and mgr is created as needed (see "deriveChildManager"), so unsure how could we
do that.
--
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]