[MNG-5877] maven-aether-provider/maven-compat does not always generate snapshot versions using Gregorian calendar year

Postfix all repo snapshot handling not just Aether.
This commit is contained in:
Michael Osipov 2015-10-10 16:43:25 +02:00
parent 2ec27257b4
commit 4ba3b752d6
1 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ package org.apache.maven.repository.legacy.resolver.transform;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;
import org.apache.maven.artifact.Artifact;
@ -164,6 +165,7 @@ public class SnapshotTransformation
public static DateFormat getUtcDateFormatter()
{
DateFormat utcDateFormatter = new SimpleDateFormat( DEFAULT_SNAPSHOT_TIMESTAMP_FORMAT );
utcDateFormatter.setCalendar( new GregorianCalendar() );
utcDateFormatter.setTimeZone( DEFAULT_SNAPSHOT_TIME_ZONE );
return utcDateFormatter;
}