aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2008-02-25 11:45:16 +0000
committerBrett Porter <brett@apache.org>2008-02-25 11:45:16 +0000
commit0c8a0d97ed68091fa5d0f2684aeca1dd5a15c287 (patch)
tree1035de81dfc7d8dd6cfae84f59a358b14652c951
parente61bcfea4c168dfb819c217dd4e40bcee1c593e3 (diff)
downloadarchiva-0c8a0d97ed68091fa5d0f2684aeca1dd5a15c287.tar.gz
archiva-0c8a0d97ed68091fa5d0f2684aeca1dd5a15c287.zip
[MRM-691] diagnostic message for failures
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@630816 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaRepositoryScanningTaskExecutor.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaRepositoryScanningTaskExecutor.java b/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaRepositoryScanningTaskExecutor.java
index f5eeb388f..527ee34fc 100644
--- a/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaRepositoryScanningTaskExecutor.java
+++ b/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaRepositoryScanningTaskExecutor.java
@@ -19,8 +19,6 @@ package org.apache.maven.archiva.scheduled.executors;
* under the License.
*/
-import java.util.List;
-
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
@@ -40,6 +38,8 @@ import org.codehaus.plexus.taskqueue.execution.TaskExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.List;
+
/**
* ArchivaRepositoryScanningTaskExecutor
*
@@ -93,6 +93,10 @@ public class ArchivaRepositoryScanningTaskExecutor
try
{
ManagedRepositoryConfiguration arepo = archivaConfiguration.getConfiguration().findManagedRepositoryById( repoTask.getRepositoryId() );
+ if ( arepo == null )
+ {
+ throw new TaskExecutionException( "Unable to execute RepositoryTask with invalid repository id: " + repoTask.getRepositoryId() );
+ }
long sinceWhen = RepositoryScanner.FRESH_SCAN;