no need to create etc.. if the index already exists

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1443258 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-02-06 22:49:25 +00:00
parent 295d3296c0
commit 53f8581435
2 changed files with 9 additions and 7 deletions

View File

@ -584,6 +584,14 @@ public class DefaultManagedRepositoryAdmin
throws RepositoryAdminException
{
IndexingContext context = indexer.getIndexingContexts().get( repository.getId() );
if ( context != null )
{
log.debug( "skip adding repository indexingContent with id {} as already exists", repository.getId() );
return context;
}
// take care first about repository location as can be relative
File repositoryDirectory = new File( repository.getLocation() );
@ -602,13 +610,7 @@ public class DefaultManagedRepositoryAdmin
try
{
IndexingContext context = indexer.getIndexingContexts().get( repository.getId() );
if ( context != null )
{
log.debug( "skip adding repository indexingContent with id {} as already exists", repository.getId() );
return context;
}
String indexDir = repository.getIndexDirectory();
File managedRepository = new File( repository.getLocation() );

View File

@ -91,7 +91,7 @@ public class ArchivaIndexingTaskExecutor
}
/**
* depending on current {@link Action} you have.
* depending on current {@link Task} you have.
* If {@link org.apache.archiva.scheduler.indexing.ArtifactIndexingTask.Action.FINISH} && isExecuteOnEntireRepo:
* repository will be scanned.
*