问题
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