PR: MNG-861

make sure build number gets updated when updating metadata

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280073 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-11 04:38:39 +00:00
parent 1d6b35cc56
commit ed0b352c9a
1 changed files with 11 additions and 8 deletions

View File

@ -151,15 +151,18 @@ public class SnapshotArtifactRepositoryMetadata
v.setSnapshot( snapshot );
changed = true;
}
else if ( s.getTimestamp() != null && !s.getTimestamp().equals( snapshot.getTimestamp() ) )
else
{
s.setTimestamp( snapshot.getTimestamp() );
changed = true;
}
else if ( s.getBuildNumber() != snapshot.getBuildNumber() )
{
s.setBuildNumber( snapshot.getBuildNumber() );
changed = true;
if ( s.getTimestamp() != null && !s.getTimestamp().equals( snapshot.getTimestamp() ) )
{
s.setTimestamp( snapshot.getTimestamp() );
changed = true;
}
if ( s.getBuildNumber() != snapshot.getBuildNumber() )
{
s.setBuildNumber( snapshot.getBuildNumber() );
changed = true;
}
}
}