diff options
author | Olivier Lamy <olamy@apache.org> | 2012-09-12 21:45:27 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-09-12 21:45:27 +0000 |
commit | 8136dbe4d271854687b6c067333e3c821db79cec (patch) | |
tree | e4d65e1f6246c719accd6b693273cd1a6f19f070 /archiva-modules/archiva-scheduler/archiva-scheduler-indexing | |
parent | 838b6e957be7c24b54c493d48b8a5e30a05e93be (diff) | |
download | archiva-8136dbe4d271854687b6c067333e3c821db79cec.tar.gz archiva-8136dbe4d271854687b6c067333e3c821db79cec.zip |
[MRM-1263] creating an m2eclipse compatible index should be an optional component.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1384138 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-scheduler/archiva-scheduler-indexing')
-rw-r--r-- | archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutor.java | 28 |
1 files changed, 17 insertions, 11 deletions
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 89705e7e8..3e21b5b23 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 @@ -236,17 +236,23 @@ public class ArchivaIndexingTaskExecutor context.optimize(); - File managedRepository = new File( repository.getLocation() ); - String indexDirectory = repository.getIndexDirectory(); - final File indexLocation = StringUtils.isBlank( indexDirectory ) - ? new File( managedRepository, ".indexer" ) - : new File( indexDirectory ); - IndexPackingRequest request = new IndexPackingRequest( context, indexLocation ); - indexPacker.packIndex( request ); - context.updateTimestamp( true ); - - log.debug( "Index file packaged at '{}'.", indexLocation.getPath() ); - + if ( repository.isSkipPackedIndexCreation() ) + { + File managedRepository = new File( repository.getLocation() ); + String indexDirectory = repository.getIndexDirectory(); + final File indexLocation = StringUtils.isBlank( indexDirectory ) + ? new File( managedRepository, ".indexer" ) + : new File( indexDirectory ); + IndexPackingRequest request = new IndexPackingRequest( context, indexLocation ); + indexPacker.packIndex( request ); + context.updateTimestamp( true ); + + log.debug( "Index file packaged at '{}'.", indexLocation.getPath() ); + } + else + { + log.debug( "skip packed index creation" ); + } } catch ( IOException e ) { |