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

@ -78,12 +78,18 @@ public void transformForDeployment( Artifact artifact, ArtifactRepository remote
artifact.setBaseVersion( m.group( 1 ) + "-" + SNAPSHOT_VERSION );
}
else if ( isSnapshot( artifact ) )
{
try
{
SnapshotArtifactMetadata metadata;
try
{
metadata = (SnapshotArtifactMetadata) retrieveFromRemoteRepository( artifact, remoteRepository, null );
}
catch ( ResourceDoesNotExistException e )
{
// ignore. We'll be creating this metadata if it doesn't exist...
metadata = (SnapshotArtifactMetadata) createMetadata( artifact );
}
metadata.update();
@ -91,11 +97,6 @@ else if ( isSnapshot( artifact ) )
artifact.addMetadata( metadata );
}
catch ( ResourceDoesNotExistException e )
{
// ignore. We'll be creating this metadata if it doesn't exist...
}
}
}
private static boolean isSnapshot( Artifact artifact )