SLING-9038 - Catch File Not Found Exception and only report it as trace message as it might be resolved later in another try
diff --git a/src/main/java/org/apache/sling/feature/io/artifacts/ArtifactManager.java b/src/main/java/org/apache/sling/feature/io/artifacts/ArtifactManager.java
index 5767c3b..0d91332 100644
--- a/src/main/java/org/apache/sling/feature/io/artifacts/ArtifactManager.java
+++ b/src/main/java/org/apache/sling/feature/io/artifacts/ArtifactManager.java
@@ -18,6 +18,7 @@
import java.io.BufferedReader;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -365,6 +366,10 @@
this.config.incCachedArtifacts();
}
return cacheFile.toURI().toURL();
+ } catch ( final FileNotFoundException e) {
+ logger.trace("File not found here (keep on looking): '{}'", url);
+ // Do not report if the file does not exist as we cycle through the various sources
+ return null;
} catch ( final Exception e) {
logger.info("Artifact not found in one repository", e);
// ignore for now