怎么找到Bundled Maven 3的配置文件settings.xml?Java工程/Maven搭建/Intellij开发环境

发布于 2022-09-12 02:47:28 字数 1470 浏览 16 评论 0

A new Java Project is created. Here Maven is used as the building management tool and a pom.xml file is created to manage the dependent packages. In the Intellij IDE, how to locate the settings.xml when the Maven is a bundled Maven 3? I did the following opertations

IntelliJ IDEA -> Preferences -> Build, Execution, Deployment -> Build Tools -> Maven

and I navigated myself to a place where the Maven home directory can be overwritten and thus the path of settings.xml file can be visible and the settings can be changed outside this Java project scope.

Do I have to overwrite the Maven home directory and prepare a local Maven copy for each Java project? Is there a shortcut in the IntelliJ IDE such that I can have access to the setting files of a bundled Maven?

There are many active experts at SegmentFault. Please share your knowledge. Thanks!!!

新建一个Java工程,使用Maven做搭建管理,在pom.xml中规划依赖软件包,在Intellij开发环境中,怎么找到Bundled Maven 3的配置文件settings.xml?

假如我做以下的操作

IntelliJ IDEA -> Preferences -> Build, Execution, Deployment -> Build Tools -> Maven

然后我可以找到到一个页面,在这个页面上整个Maven主目录可以被设置覆盖,这样的话配置文件settings.xml的路径就可见了,settings可以在这个Java项目的范围外被修改。

一定要覆盖Maven的主目录才能修改配置文件的吗,针对每个工程都得下载一次Maven的吗?有没有一种快捷方式在IntelliJ中,可以直接读取捆绑的Maven的配置文件呢?

多谢SegmentFault上的积极回答问题的行家们!先谢过了!

SFQuestion2.png

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

萌能量女王 2022-09-19 02:47:28

Bundled Maven 3 就是idea内置的maven。

在idea,settings可以修改啊,直接就可以选择某一个xml文件。

不需要每一个项目都下载一个maven。一般在settings中配置maven仓库本地目录,镜像仓库mirror,profile。

而每个项目如果使用不同的仓库repo的,可以通过profile定义repo区分,或者在pom.xml直接定义repo进行使用。


Bundled Maven 3 的配置可以在插件目录中找到,比如:

IDEA-U/ch-0/201.7223.91/plugins/maven/lib/maven3/conf

愛上了 2022-09-19 02:47:28
  1. 不知道你是什么版本,bundle3.0.5应该是很老的版本了,截图下面应该有一个选择 settings.xml 路径的选项
  2. 常用的配置也犯不上隔离settings.xml吧
停顿的约定 2022-09-19 02:47:28

Thanks for replying @SvenAugustus and @_TNT_. But you did not answer my question. I was asking for whether a bundled Maven's setting file could be reached. I do not need a way to overwrite the setting; instead, i need a way to look into the bundled setting.
多谢@AvenAugustus和@_TNT_的回复。但是你们没有回答我的问题。我问的是,可以找到捆绑的Maven的配置文件吗?我不需要一种可以覆盖配置的方法,我需要一种可以查看和修改捆绑/内带的/自建的Maven的配置的方法。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文