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
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.
java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.FSDirectory@C:\Documents and Settings\dutour_d\.netbeans\6.8\var\cache\maven-plugins-index\7: files:
Created attachment 99642 [details]
All this code was introduced to complete plugin names, apparently. Maybe can be taken from the index instead?
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.
Created attachment 109176 [details]
Work in progress
Integrated into 'main-golden', will be available in build *201107060600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jesse Glick <email@example.com>
Log: #186939: rewrite PluginIndexManager to use the regular Nexus index.
*** Bug 200239 has been marked as a duplicate of this bug. ***