Skip to content

Commit

Permalink
Reduce log spam from MavenPomDownloader.
Browse files Browse the repository at this point in the history
Only send downloadError event when all repositories have failed to be accessed.
  • Loading branch information
sambsnyd committed Jan 25, 2024
1 parent 4a9ea0b commit f9e5e8e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@ public Pom download(GroupArtifactVersion gav,
return pom;
} catch (HttpSenderResponseException e) {
repositoryResponses.put(repo, e.getMessage());
ctx.getResolutionListener().downloadError(gav, uris, (containingPom == null) ? null : containingPom.getRequested());
if (e.isClientSideException()) {
//If the exception is a common, client-side exception, cache an empty result.
mavenCache.putPom(resolvedGav, null);
Expand All @@ -595,7 +594,7 @@ public Pom download(GroupArtifactVersion gav,
repositoryResponses.put(repo, "Did not attempt to download because of a previous failure to retrieve from this repository.");
}
}

ctx.getResolutionListener().downloadError(gav, uris, (containingPom == null) ? null : containingPom.getRequested());
sample.stop(timer.tags("outcome", "unavailable").register(Metrics.globalRegistry));
throw new MavenDownloadingException("Unable to download POM.", null, originalGav)
.setRepositoryResponses(repositoryResponses);
Expand Down

0 comments on commit f9e5e8e

Please sign in to comment.