From 7773aa4d4055b0d124ba15648872b9addcc20181 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Wed, 28 Sep 2005 09:18:40 +0000 Subject: [PATCH] misread this change, thought it was incorporated into isSnapshot but that is what we are trying to avoid git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@292154 13f79535-47bb-0310-9956-ffa450edef68 --- .../artifact/transform/AbstractVersionTransformation.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/AbstractVersionTransformation.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/AbstractVersionTransformation.java index 314762caaa..53a1fc079a 100644 --- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/AbstractVersionTransformation.java +++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/AbstractVersionTransformation.java @@ -62,13 +62,14 @@ public abstract class AbstractVersionTransformation throws ArtifactMetadataRetrievalException { RepositoryMetadata metadata; - if ( artifact.isSnapshot() ) + // Don't use snapshot metadata for LATEST (which isSnapshot returns true for) + if ( !artifact.isSnapshot() || Artifact.LATEST_VERSION.equals( artifact.getBaseVersion() ) ) { - metadata = new SnapshotArtifactRepositoryMetadata( artifact ); + metadata = new ArtifactRepositoryMetadata( artifact ); } else { - metadata = new ArtifactRepositoryMetadata( artifact ); + metadata = new SnapshotArtifactRepositoryMetadata( artifact ); } repositoryMetadataManager.resolve( metadata, remoteRepositories, localRepository );