Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 186939 - PluginIndexManager uses own prebuilt Lucene index, sometimes throws FNFE
PluginIndexManager uses own prebuilt Lucene index, sometimes throws FNFE
Product: projects
Classification: Unclassified
Component: Maven
All All
: P3 (vote)
: 7.1
Assigned To: Jesse Glick
Depends on:
Blocks: 154108
  Show dependency treegraph
Reported: 2010-05-29 11:56 UTC by Exceptions Reporter
Modified: 2011-07-26 14:00 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT

stacktrace (1.04 KB, text/plain)
2010-05-29 11:56 UTC, Exceptions Reporter
Work in progress (36.91 KB, patch)
2011-07-01 00:40 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2010-05-29 11:56:05 UTC
Build: NetBeans IDE 6.8 (Build 200912041610)
VM: Java HotSpot(TM) Client VM, 16.0-b13, Java(TM) SE Runtime Environment, 1.6.0_18-b07
OS: Windows XP

User Comments:
t_yano: simplly select 'action' on project property dialog.

t_yano: select 'Action' from category pane of project property dialog.

t_yano: open project property dialog and select 'action' on the dialog.

t_yano: select 'Action' on Project Property Dialog of Mave Project.

t_yano: Open project property window.

t_yano: click save button on Properties dialog of Maven Project after changing some settings.

Stacktrace: no segments* file found in\Documents and Settings\dutour_d\.netbeans\6.8\var\cache\maven-plugins-index\7: files:
   at org.apache.lucene.index.SegmentInfos$
   at org.netbeans.modules.maven.indexer.api.PluginIndexManager.getIndexSearcher(
   at org.netbeans.modules.maven.indexer.api.PluginIndexManager.getPluginGoalNames(
Comment 1 Exceptions Reporter 2010-05-29 11:56:09 UTC
Created attachment 99642 [details]
Comment 2 Jesse Glick 2010-10-06 20:16:41 UTC
All this code was introduced to complete plugin names, apparently. Maybe can be taken from the index instead?
Comment 3 Jesse Glick 2010-10-07 16:18:54 UTC
Since the index is prebuilt, as a hotfix might be able to just discard the cached value if any problem arises.

More generally, the design is poor here. There used to be a bunch of XML files shipped with the IDE listing known plugins and their goals, produced by some script (I have no idea what); this was converted to a binary Lucene index, occasionally updated. The index is now pretty well out of date; for example, it makes no mention of maven-nbm-plugin 3.2, much less the recently released 3.3.

Better would be to go through RepositoryQueries, i.e. the regular repository index, which will be nearly current. In particular, MavenPluginArtifactInfoIndexCreator already records FLD_PLUGIN_PREFIX and FLD_PLUGIN_GOALS, which will probably suffice to honor getPluginGoalNames, getPluginGoals, and getPluginsForGoalPrefix. getPluginParameters can likely be accomplished by directly parsing META-INF/maven/plugin.xml from the local copy of the artifact, or perhaps by using MavenPluginManager. getLifecyclePlugins I am less sure about; surely there is some interface in Maven that would work for this purpose, though in the absence of meaningful Javadoc it is hard to tell; LifeCyclePluginAnalyzer looks promising.
Comment 4 Jesse Glick 2011-07-01 00:40:42 UTC
Created attachment 109176 [details]
Work in progress
Comment 5 Jesse Glick 2011-07-05 19:49:18 UTC
core-main #3eeb7a66a819
Comment 6 Quality Engineering 2011-07-06 14:05:30 UTC
Integrated into 'main-golden', will be available in build *201107060600* on (upload may still be in progress)
User: Jesse Glick <>
Log: #186939: rewrite PluginIndexManager to use the regular Nexus index.
Comment 7 Jesse Glick 2011-07-19 17:18:35 UTC
*** Bug 200239 has been marked as a duplicate of this bug. ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo