diff --git a/maven-repository-core/src/main/java/org/apache/maven/repository/scheduler/DefaultRepositoryTaskScheduler.java b/maven-repository-core/src/main/java/org/apache/maven/repository/scheduler/DefaultRepositoryTaskScheduler.java index 2f0bf6647..be7a66e0f 100644 --- a/maven-repository-core/src/main/java/org/apache/maven/repository/scheduler/DefaultRepositoryTaskScheduler.java +++ b/maven-repository-core/src/main/java/org/apache/maven/repository/scheduler/DefaultRepositoryTaskScheduler.java @@ -109,6 +109,7 @@ public class DefaultRepositoryTaskScheduler new CronTrigger( INDEXER_JOB + "Trigger", DISCOVERER_GROUP, configuration.getIndexerCronExpression() ); scheduler.scheduleJob( jobDetail, trigger ); + // TODO: run as a job so it doesn't block startup/configuration saving try { indexerTask.executeNowIfNeeded(); diff --git a/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/admin/ConfigureAction.java b/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/admin/ConfigureAction.java index 2e8955957..2c4fd299e 100644 --- a/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/admin/ConfigureAction.java +++ b/maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/admin/ConfigureAction.java @@ -68,6 +68,8 @@ public class ConfigureAction // TODO: these defaults belong in the model. They shouldn't be stored here, as you want them to re-default // should the repository change even if these didn't + // TODO: if these are changed, do we move the index or recreate it? + // TODO: these should be on an advanced configuration form, not the standard one if ( StringUtils.isEmpty( configuration.getIndexPath() ) ) { @@ -85,6 +87,8 @@ public class ConfigureAction configurationStore.storeConfiguration( configuration ); + // TODO: if the repository has changed, we need to check if indexing is needed + addActionMessage( "Successfully saved configuration" ); return SUCCESS;