Lines 52-66
Link Here
|
52 |
import java.util.regex.Matcher; |
52 |
import java.util.regex.Matcher; |
53 |
import java.util.regex.Pattern; |
53 |
import java.util.regex.Pattern; |
54 |
import java.util.zip.ZipError; |
54 |
import java.util.zip.ZipError; |
|
|
55 |
import org.apache.lucene.index.DirectoryReader; |
55 |
import org.apache.lucene.index.IndexReader; |
56 |
import org.apache.lucene.index.IndexReader; |
56 |
import org.apache.lucene.index.Term; |
57 |
import org.apache.lucene.index.Term; |
57 |
import org.apache.lucene.queryParser.QueryParser; |
58 |
import org.apache.lucene.queryparser.classic.QueryParser; |
58 |
import org.apache.lucene.search.*; |
59 |
import org.apache.lucene.search.*; |
|
|
60 |
import org.apache.lucene.store.Directory; |
59 |
import org.apache.lucene.store.FSDirectory; |
61 |
import org.apache.lucene.store.FSDirectory; |
|
|
62 |
import org.apache.lucene.store.LockFactory; |
63 |
import org.apache.lucene.store.MMapDirectory; |
64 |
import org.apache.lucene.store.NativeFSLockFactory; |
60 |
import org.apache.lucene.store.SimpleFSDirectory; |
65 |
import org.apache.lucene.store.SimpleFSDirectory; |
61 |
import org.apache.maven.artifact.Artifact; |
66 |
import org.apache.maven.artifact.Artifact; |
62 |
import org.apache.maven.artifact.repository.ArtifactRepository; |
67 |
import org.apache.maven.artifact.repository.ArtifactRepository; |
63 |
import org.apache.maven.index.*; |
68 |
import org.apache.maven.index.*; |
|
|
69 |
import org.apache.maven.index.Scanner; |
64 |
import org.apache.maven.index.artifact.ArtifactPackagingMapper; |
70 |
import org.apache.maven.index.artifact.ArtifactPackagingMapper; |
65 |
import org.apache.maven.index.context.DefaultIndexingContext; |
71 |
import org.apache.maven.index.context.DefaultIndexingContext; |
66 |
import org.apache.maven.index.context.IndexCreator; |
72 |
import org.apache.maven.index.context.IndexCreator; |
Lines 68-74
Link Here
|
68 |
import org.apache.maven.index.context.IndexingContext; |
74 |
import org.apache.maven.index.context.IndexingContext; |
69 |
import org.apache.maven.index.creator.OsgiArtifactIndexCreator; |
75 |
import org.apache.maven.index.creator.OsgiArtifactIndexCreator; |
70 |
import org.apache.maven.index.expr.StringSearchExpression; |
76 |
import org.apache.maven.index.expr.StringSearchExpression; |
71 |
import org.apache.maven.index.search.grouping.GGrouping; |
|
|
72 |
import org.apache.maven.index.updater.IndexUpdateRequest; |
77 |
import org.apache.maven.index.updater.IndexUpdateRequest; |
73 |
import org.apache.maven.index.updater.IndexUpdater; |
78 |
import org.apache.maven.index.updater.IndexUpdater; |
74 |
import org.apache.maven.index.updater.ResourceFetcher; |
79 |
import org.apache.maven.index.updater.ResourceFetcher; |
Lines 365-371
Link Here
|
365 |
if (!loc.exists() || !new File(loc, "timestamp").exists()) { |
370 |
if (!loc.exists() || !new File(loc, "timestamp").exists()) { |
366 |
index = true; |
371 |
index = true; |
367 |
LOGGER.log(Level.FINER, "Index Not Available: {0} at: {1}", new Object[]{info.getId(), loc.getAbsolutePath()}); |
372 |
LOGGER.log(Level.FINER, "Index Not Available: {0} at: {1}", new Object[]{info.getId(), loc.getAbsolutePath()}); |
368 |
} else if (!IndexReader.indexExists(new SimpleFSDirectory(loc))) { |
373 |
} else if (! DirectoryReader.indexExists(new SimpleFSDirectory(loc))) { |
369 |
index = true; |
374 |
index = true; |
370 |
LOGGER.log(Level.FINER, "Index Not Available: {0} at: {1}", new Object[]{info.getId(), loc.getAbsolutePath()}); |
375 |
LOGGER.log(Level.FINER, "Index Not Available: {0} at: {1}", new Object[]{info.getId(), loc.getAbsolutePath()}); |
371 |
} |
376 |
} |
Lines 1595-1601
Link Here
|
1595 |
for (final RepositoryInfo repo : repos) { |
1600 |
for (final RepositoryInfo repo : repos) { |
1596 |
File loc = new File(getDefaultIndexLocation(), repo.getId()); // index folder |
1601 |
File loc = new File(getDefaultIndexLocation(), repo.getId()); // index folder |
1597 |
try { |
1602 |
try { |
1598 |
if (loc.exists() && new File(loc, "timestamp").exists() && IndexReader.indexExists(new SimpleFSDirectory(loc))) { |
1603 |
if (loc.exists() && new File(loc, "timestamp").exists() && DirectoryReader.indexExists(new SimpleFSDirectory(loc))) { |
1599 |
toRet.add(repo); |
1604 |
toRet.add(repo); |
1600 |
} |
1605 |
} |
1601 |
} catch (IOException ex) { |
1606 |
} catch (IOException ex) { |