summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-02-06 22:49:25 +0000
committerOlivier Lamy <olamy@apache.org>2013-02-06 22:49:25 +0000
commit53f8581435af066f8f470c46013c2e0962494113 (patch)
treec473b669cff7b45f3ae642be871c9aff1f5adcb8 /archiva-modules
parent295d3296c04e7b91b393d910b38f3d7ddef85489 (diff)
downloadarchiva-53f8581435af066f8f470c46013c2e0962494113.tar.gz
archiva-53f8581435af066f8f470c46013c2e0962494113.zip
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
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java14
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutor.java2
2 files changed, 9 insertions, 7 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
index c562e3022..0ecdb3724 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
@@ -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() );
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutor.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutor.java
index 3441efa8a..a5197dcf5 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutor.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutor.java
@@ -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.
*