mirror of https://github.com/apache/maven.git
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:
parent
f48d2c367c
commit
1e8e1d21ff
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue