public class DaysOldRepositoryPurge
extends AbstractRepositoryPurge
{
- private static final SimpleDateFormat timestampParser;
- static
- {
- timestampParser = new SimpleDateFormat( "yyyyMMdd.HHmmss" );
- timestampParser.setTimeZone( DateUtils.UTC_TIME_ZONE );
- }
+ private SimpleDateFormat timestampParser;
private int daysOlder;
-
+
public DaysOldRepositoryPurge( ManagedRepositoryContent repository, ArtifactDAO artifactDao,
int daysOlder )
{
super( repository, artifactDao );
this.daysOlder = daysOlder;
+ timestampParser = new SimpleDateFormat( "yyyyMMdd.HHmmss" );
+ timestampParser.setTimeZone( DateUtils.UTC_TIME_ZONE );
}
public void process( String path )
private static final char NUMS[] = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
- private static final SimpleDateFormat lastUpdatedFormat;
+ private SimpleDateFormat lastUpdatedFormat;
- static
+ public MetadataTools()
{
lastUpdatedFormat = new SimpleDateFormat( "yyyyMMddHHmmss" );
lastUpdatedFormat.setTimeZone( DateUtils.UTC_TIME_ZONE );
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.model.RepositoryContentStatistics;
+import java.text.SimpleDateFormat;
import java.util.List;
/**
private transient List<String> invalidConsumers;
private transient long startTimestamp;
+
+ private SimpleDateFormat df = new SimpleDateFormat();
public void triggerStart()
{
public String toDump( ManagedRepositoryConfiguration repo )
{
- java.text.SimpleDateFormat df = new java.text.SimpleDateFormat();
StringBuffer buf = new StringBuffer();
buf.append( "\n.\\ Scan of " ).append( this.getRepositoryId() );