简体   繁体   English

Eclipse插件:如何读取在M2Eclipse插件中配置的“ settings.xml”文件路径

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

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. 现在,我正在开发一个新的Eclipse插件,在这个插件中,我需要获取在m2Eclipse插件中配置的settings.xml文件并对其进行更新。 I want to know whether the m2eclipse plugin has provided the related extension point so that I can use directly. 我想知道m2eclipse插件是否提供了相关的扩展点,以便我可以直接使用。

I've researched its user guide and the website, I cannot find any useful information for resolving my problem. 我已经研究了其用户指南和网站,找不到任何有用的信息来解决我的问题。

Ps: 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. 附:我不是说如何在maven插件中配置settings.xml,而是开发一个新的插件来读取m2eclipse中的settings.xml。

You can have access to the user settings.xml path via 您可以通过访问用户settings.xml路径

MavenPlugin.getMavenConfiguration().getUserSettingsFile() MavenPlugin.getMavenConfiguration()。getUserSettingsFile()

And the global settings via 以及通过

MavenPlugin.getMavenConfiguration().getGlobalSettingsFile() MavenPlugin.getMavenConfiguration()。getGlobalSettingsFile()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM