[MNG-1264] make it clearer if the index gets into a bad state

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@825415 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2009-10-15 07:22:29 +00:00
parent 3b5817496e
commit 9325a5a1c6
2 changed files with 6 additions and 0 deletions

View File

@ -147,6 +147,7 @@ public class NexusIndexerConsumer
{
log.error( "Error queueing task: " + task + ": " + e.getMessage(), e );
}
context = null;
}
public List<String> getExcludes()

View File

@ -115,6 +115,11 @@ public class ArchivaIndexingTaskExecutor
}
else
{
if ( context.getIndexDirectory() == null )
{
throw new TaskExecutionException( "Trying to index an artifact but the context is already closed" );
}
try
{
File artifactFile = indexingTask.getResourceFile();