Eclipse插件:如何读取“settings.xml”在M2Eclipse插件中配置的文件路径 [英] Eclipse plugin: how to read the "settings.xml" file path which is configured in M2Eclipse plugin

查看:526
本文介绍了Eclipse插件:如何读取“settings.xml”在M2Eclipse插件中配置的文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我正在开发一个新的Eclipse插件,在这个插件中,我需要获取在m2Eclipse插件中配置的settings.xml文件并进行更新。我想知道m2eclipse插件是否提供了相关的扩展点,以便我可以直接使用。



我研究了其用户指南和网站,我找不到任何有用的信息解决我的问题。



Ps:我不是说如何配置maven插件中的settings.xml,而是开发一个新的插件来读取设置。 xml in m2eclipse。

解决方案

您可以通过


$访问用户settings.xml路径b $ b


MavenPlugin.getMavenConfiguration()。getUserSettingsFile()


全局设置通过


MavenPlugin.getMavenConfiguration()。getGlobalSettingsFile()



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.

解决方案

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

MavenPlugin.getMavenConfiguration().getUserSettingsFile()

And the global settings via

MavenPlugin.getMavenConfiguration().getGlobalSettingsFile()

这篇关于Eclipse插件:如何读取“settings.xml”在M2Eclipse插件中配置的文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆