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


##########
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:
   I don't really see a use case in the code where `scope == "system"` and 
`localPath != null` are not interchangeable.  So I think we don't need to 
manage the local paths, they'll just be retrieved from the `SystemScopeHandler` 
when needed using `getSystemPath(Artifact)`.



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

Reply via email to