From 1e8e1d21ff2c4c37e5e8514d3db36f7cd108604c Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Wed, 20 Jul 2005 02:18:19 +0000 Subject: [PATCH] correct behaviour git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@219832 13f79535-47bb-0310-9956-ffa450edef68 --- .../transform/SnapshotTransformation.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/SnapshotTransformation.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/SnapshotTransformation.java index 9a93753528..c371712969 100644 --- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/SnapshotTransformation.java +++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/SnapshotTransformation.java @@ -79,22 +79,23 @@ public class SnapshotTransformation } else if ( isSnapshot( artifact ) ) { + SnapshotArtifactMetadata metadata; + try { - SnapshotArtifactMetadata metadata; - metadata = (SnapshotArtifactMetadata) retrieveFromRemoteRepository( artifact, remoteRepository, null ); - - metadata.update(); - - artifact.setVersion( metadata.constructVersion() ); - - artifact.addMetadata( metadata ); } catch ( ResourceDoesNotExistException e ) { // ignore. We'll be creating this metadata if it doesn't exist... + metadata = (SnapshotArtifactMetadata) createMetadata( artifact ); } + + metadata.update(); + + artifact.setVersion( metadata.constructVersion() ); + + artifact.addMetadata( metadata ); } }