diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/transform/SnapshotTransformation.java b/maven-artifact/src/main/java/org/apache/maven/artifact/transform/SnapshotTransformation.java index 5e353ed9a5..d785815617 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/transform/SnapshotTransformation.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/transform/SnapshotTransformation.java @@ -69,7 +69,6 @@ public class SnapshotTransformation throw new ArtifactMetadataRetrievalException( "Error reading local metadata", e ); } - String version = localMetadata.constructVersion(); boolean alreadyResolved = alreadyResolved( artifact ); if ( !alreadyResolved ) { @@ -144,6 +143,8 @@ public class SnapshotTransformation } else { + String version = localMetadata.constructVersion(); + if ( getLogger().isInfoEnabled() ) { if ( !version.equals( artifact.getBaseVersion() ) && !alreadyResolved )