mirror of https://github.com/apache/maven.git
fix problem with snapshots being repeatedly checked, recently introduced.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168545 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d17b250fec
commit
b31e42b511
|
@ -121,14 +121,21 @@ public class SnapshotTransformation
|
|||
SnapshotArtifactMetadata remoteMetadata = SnapshotArtifactMetadata.retrieveFromRemoteRepository(
|
||||
artifact, remoteRepository, wagonManager );
|
||||
|
||||
if ( remoteMetadata.compareTo( localMetadata ) > 0 )
|
||||
int difference = remoteMetadata.compareTo( localMetadata );
|
||||
if ( difference > 0 )
|
||||
{
|
||||
// remote is newer
|
||||
artifact.setRepository( remoteRepository );
|
||||
|
||||
localMetadata = remoteMetadata;
|
||||
|
||||
checkedUpdates = true;
|
||||
}
|
||||
else if ( difference == 0 )
|
||||
{
|
||||
// Identical, simply touch the file to prevent re-checking
|
||||
checkedUpdates = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue