Eclipse plugin: how to read the “settings.xml” file path which is configured in M2Eclipse plugin

廉价感情. 提交于 2019-12-25 08:00:14

问题


Now I'm developing a new Eclipse plugin, in this plugin I need to get the settings.xml file which is configured in m2Eclipse plugin and update it. I want to know whether the m2eclipse plugin has provided the related extension point so that I can use directly.

I've researched its user guide and the website, I cannot find any useful information for resolving my problem.

P.s: I'm not saying how to configure the settings.xml in maven plugin but developing a new plugin to read the settings.xml in m2eclipse.


回答1:


You can have access to the user settings.xml path via

MavenPlugin.getMavenConfiguration().getUserSettingsFile()

And the global settings via

MavenPlugin.getMavenConfiguration().getGlobalSettingsFile()



来源:https://stackoverflow.com/questions/40259861/eclipse-plugin-how-to-read-the-settings-xml-file-path-which-is-configured-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!