Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
582 views
in Technique[技术] by (71.8m points)

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...