mirror of https://github.com/apache/archiva.git
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:
parent
295d3296c0
commit
53f8581435
|
@ -584,6 +584,14 @@ public class DefaultManagedRepositoryAdmin
|
||||||
throws RepositoryAdminException
|
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
|
// take care first about repository location as can be relative
|
||||||
File repositoryDirectory = new File( repository.getLocation() );
|
File repositoryDirectory = new File( repository.getLocation() );
|
||||||
|
|
||||||
|
@ -602,13 +610,7 @@ public class DefaultManagedRepositoryAdmin
|
||||||
try
|
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();
|
String indexDir = repository.getIndexDirectory();
|
||||||
File managedRepository = new File( repository.getLocation() );
|
File managedRepository = new File( repository.getLocation() );
|
||||||
|
|
|
@ -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:
|
* If {@link org.apache.archiva.scheduler.indexing.ArtifactIndexingTask.Action.FINISH} && isExecuteOnEntireRepo:
|
||||||
* repository will be scanned.
|
* repository will be scanned.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue