Skip to content

Commit

Permalink
[WFMP-230] Log fallback channel resolution messages as debug instead …
Browse files Browse the repository at this point in the history
…of warnings.

https://issues.redhat.com/browse/WFMP-230
Signed-off-by: James R. Perkins <jperkins@redhat.com>
  • Loading branch information
jamezp committed Dec 7, 2023
1 parent c1f769f commit 17434f1
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,22 @@ public void resolve(MavenArtifact artifact) throws MavenUniverseException {
}
}
if (!requireChannel) {
log.warn("Resolution of artifact " + artifact.getGroupId() + ":" +
artifact.getArtifactId() + " failed using configured channels. Using original version.");
if (log.isDebugEnabled()) {
log.debug("Resolution of artifact " + artifact.getGroupId() + ":" +
artifact.getArtifactId() + " failed using configured channels. Using original version.");
}
// unable to resolve the artifact through the channel.
// if the version is defined, let's resolve it directly
if (artifact.getVersion() == null) {
log.error("No version provided.");
throw new MavenUniverseException(ex.getLocalizedMessage(), ex);
}
try {
log.warn("Using version " + artifact.getVersion() +
" to resolve artifact " + artifact.getGroupId() + ":" +
artifact.getArtifactId());
if (log.isDebugEnabled()) {
log.debug("Using version " + artifact.getVersion() +
" to resolve artifact " + artifact.getGroupId() + ":" +
artifact.getArtifactId());
}
org.wildfly.channel.MavenArtifact mavenArtifact = channelSession.resolveDirectMavenArtifact(
artifact.getGroupId(), artifact.getArtifactId(), artifact.getExtension(), artifact.getClassifier(),
artifact.getVersion());
Expand Down

0 comments on commit 17434f1

Please sign in to comment.