long time = System.currentTimeMillis();
for ( Iterator i = configuration.getRepositories().iterator(); i.hasNext(); )
{
RepositoryConfiguration repositoryConfiguration = (RepositoryConfiguration) i.next();
if ( !repositoryConfiguration.isIndexed() )
{
continue;
}
ArtifactRepository repository = repoFactory.createRepository( repositoryConfiguration );
List filteredConsumers = filterConsumers( consumers, repository );
DiscovererStatistics lastRunStats = new DiscovererStatistics( repository );
try
{
lastRunStats.load( DATAREFRESH_FILE );
}
catch ( IOException e )
{
getLogger().info(
"Unable to load last run statistics for repository [" + repository.getId() + "]: "
+ e.getMessage() );
}
try
{
DiscovererStatistics stats = discoverer
.walkRepository( repository, filteredConsumers, repositoryConfiguration.isIncludeSnapshots(),
lastRunStats.getTimestampFinished(), null, null );
stats.dump( getLogger() );
stats.save( DATAREFRESH_FILE );
}