cstamas commented on code in PR #297:
URL: https://github.com/apache/maven-resolver/pull/297#discussion_r1225863920


##########
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultUpdateCheckManager.java:
##########
@@ -185,7 +224,8 @@ public void checkArtifact(RepositorySystemSession session, 
UpdateCheck<Artifact,
             if (error != null) {
                 check.setException(newException(error, artifact, repository));
             }
-        } else if (isUpdatedRequired(session, lastUpdated, check.getPolicy())) 
{
+        } else if (updatePolicyScope.isApplyToArtifact()
+                && isUpdatedRequired(session, lastUpdated, check.getPolicy())) 
{
             check.setRequired(true);
         } else if (fileExists) {
             LOGGER.debug("Skipped remote request for {}, locally cached 
artifact up-to-date", check.getItem());

Review Comment:
   Here the message may need adjustment: "locally cache artifact is up-to-date" 
(if policyScope applies) ot "local cache artifact is present" (if policyScope 
does not applies and file is present)



##########
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultUpdateCheckManager.java:
##########
@@ -185,7 +224,8 @@ public void checkArtifact(RepositorySystemSession session, 
UpdateCheck<Artifact,
             if (error != null) {
                 check.setException(newException(error, artifact, repository));
             }
-        } else if (isUpdatedRequired(session, lastUpdated, check.getPolicy())) 
{
+        } else if (updatePolicyScope.isApplyToArtifact()
+                && isUpdatedRequired(session, lastUpdated, check.getPolicy())) 
{
             check.setRequired(true);
         } else if (fileExists) {
             LOGGER.debug("Skipped remote request for {}, locally cached 
artifact up-to-date", check.getItem());

Review Comment:
   Here the message may need adjustment: "locally cache artifact is up-to-date" 
(if policyScope applies) or "local cache artifact is present" (if policyScope 
does not applies and file is present)



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