如何调用m2e plugin reindex API?

时间:2016-10-31 07:26:51

标签: eclipse-plugin m2eclipse m2e

m2e插件是否能够提供其他插件可以更新settings.xml文件并调用eclipse maven插件重新编制索引的能力?

this link中,我可以读取配置,但它只提供了读取的能力,m2e插件提供API来更新settings.xml(例如更改“localRepository”)并重新索引它?我可以通过代码修改settings.xml,但它不能激活m2e插件重新索引。

1 个答案:

答案 0 :(得分:0)

没有公共API(我们可能会在将来摆脱Nexus Index支持),但如果你喜欢生活危险,可以试试:

  

MavenPlugin.getIndexManager()。getLocalIndex()。updateIndex(force,monitor);

MavenPlugin位于org.eclipse.m2e.core包/插件中。