为什么maven settings.xml文件不存在? [英] Why maven settings.xml file is not there?

查看:259
本文介绍了为什么maven settings.xml文件不存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了eclipse的maven插件,只能在eclipse中使用它。我想要能够从终端运行maven命令,以便安装maven,如下面的链接所述:



http://www.mkyong.com/maven/how-to-install-maven-in-ubuntu/



我的问题是


  1. 我找不到这个路径中的settings.xml /home/raki/.m2 / - 我该怎么办?

  2. 上述步骤中安装的maven是否影响eclipse中安装的maven?

感谢提前

解决方案

settings.xml 不是必需的(因此在〜/ .m2文件夹中不会自动修复),除非您要更改默认设置



独立的maven和eclipse中的maven将使用相同的本地存储库(〜/ .m2文件夹)。这意味着如果某些工件/依赖关系是由独立的maven下载的,那么在eclipse中它不会被maven再次下载。



根据您使用的Eclipse版本,与独立版本相比,您可能在eclipse中具有不同的maven版本。在大多数情况下不要紧。


I installed maven plugin for eclipse and was able to use it only in eclipse. I want to be able to run maven commands from terminal so installed maven as explained in the below link:

http://www.mkyong.com/maven/how-to-install-maven-in-ubuntu/

My questions are

  1. I could not find settings.xml in this path /home/raki/.m2/ -- What should i do for this?
  2. Does the maven installed in the above step affects the maven installed in eclipse? These two mavens work independently or how is that?

Thanks in Advance

解决方案

settings.xml is not required (and thus not autocreated in ~/.m2 folder) unless you want to change the default settings.

Standalone maven and the maven in eclipse will use the same local repository (~/.m2 folder). This means if some artifacts/dependencies are downloaded by standalone maven, it will not be again downloaded by maven in eclipse.

Based on the version of Eclipse that you use, you may have different maven version in eclipse compared to the standalone. It should not matter in most cases.

这篇关于为什么maven settings.xml文件不存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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