mbien commented on code in PR #5922:
URL: https://github.com/apache/netbeans/pull/5922#discussion_r1224754780
##########
java/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java:
##########
@@ -359,24 +365,21 @@ private boolean loadIndexingContext(final RepositoryInfo
info) throws IOExceptio
}
LOGGER.log(Level.FINE, "Loading Context: {0}", info.getId());
- List<IndexCreator> creators = new ArrayList<>();
- try {
- for (IndexCreator creator :
embedder.lookupList(IndexCreator.class)) {
- if (OsgiArtifactIndexCreator.ID.equals(creator.getId())) {
- continue; //we are no interested in osgi related
content in lucene documents or ArtifactInfo objects.
- //they take up a lot of memory and we never query them
AFAIK. (import/export packages can take up to 300k
- //239915, 240150 + according to my knowledge we don't
expose any api that would allow 3rd party plugins to query the osgi stuff
- }
- creators.add(creator);
- }
- } catch (ComponentLookupException x) {
- throw new IOException(x);
- }
- if (info.isLocal()) { // #164593
- creators.add(new ArtifactDependencyIndexCreator());
- creators.add(new ClassDependencyIndexCreator());
+ List<IndexCreator> creators;
+ if (info.isLocal()) {
+ creators = List.of(
+ new JarFileContentsIndexCreator(),
+ new MinimalArtifactInfoIndexCreator(),
+ new MavenArchetypeArtifactInfoIndexCreator(),
+ new MavenPluginArtifactInfoIndexCreator(),
+ new ArtifactDependencyIndexCreator(),
+ new ClassDependencyIndexCreator()
+ );
} else {
- creators.add(new NotifyingIndexCreator());
+ creators = List.of(
+ new MinimalArtifactInfoRemoteIndexCreator(),
+ new NotifyingIndexCreator()
+ );
Review Comment:
correct
- OsgiArtifactIndexCreator was already filtered out before
- JarFileContentsIndexCreator, MavenArchetypeArtifactInfoIndexCreator,
MavenPluginArtifactInfoIndexCreator, ArtifactDependencyIndexCreator and
ClassDependencyIndexCreator are all for the local .m2 repo, not for remote
indices.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists