correct behaviour

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@219832 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-07-20 02:18:19 +00:00
parent f48d2c367c
commit 1e8e1d21ff
1 changed files with 9 additions and 8 deletions

View File

@ -79,22 +79,23 @@ public void transformForDeployment( Artifact artifact, ArtifactRepository remote
}
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 );
}
}