Spring Tool Suite中maven使用的settings.xml在哪里? [英] Where is the settings.xml used by maven in the Spring Tool Suite?

查看:1146
本文介绍了Spring Tool Suite中maven使用的settings.xml在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置用于从STS部署的ftp服务器,如下所述: http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ftp.html

I'd like to set the ftp servers for deploying from STS as described here: http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ftp.html

它应该在settings.xml中。
根据文档设置是2中的任何一个:

It should be in the settings.xml. According to documentation settings is in either of 2:


  • Maven安装:$ M2_HOME / conf / settings.xml

  • 用户的安装:$ {user.home} /.m2 / settings.xml

是$ M2_HOME。换句话说,当使用STS(Eclipse)时,在这种情况下maven的安装文件夹是什么。我在$ {user.home} /.m2 /中找不到settings.xml。
我在Windows 7下工作

Where is the $M2_HOME. In other terms when working from STS(Eclipse), what is the installation folder for maven in this case. I can't find a settings.xml in ${user.home}/.m2/ . I worked under Windows 7

这两个线程是相关的,但没有提供一个至少对我有用的明确答案:

Those 2 threads are related but do not provide a clear answer that worked for me at least:

  • maven doesnt seem to be installing with springsource tool suite
  • Eclipse (STS) + Maven , I have nothing appearing in the screenshot suggested in this last thread.

Thx提前

推荐答案

因为我自己从未使用过STS,所以我可能会离谱,但如果我理解正确的话,那就是预先打包的Eclipse发行版。如果我是正确的,您的安装只包含嵌入版本的Maven,但不包含命令行可访问的版本。您需要从此处安装一个。

I may be off-mark as I've never used STS myself, but if I understand correctly it is just a pre-packaged Eclipse distribution. If I'm correct your installation only contains an embedded version of Maven, but not a command line accessible one. You need to install one from here.

With Eclipse的3.x版本我发现你需要让你的安装指向Eclipse的外部Maven安装,以便使用 settings.xml 文件。安装下载的版本后,您可以选择 Window - >偏好 - > Maven - >安装,按添加... 并指向刚刚安装的版本。

With the 3.x releases of Eclipse I found that you need to have your installation point to an external Maven installation for Eclipse to make use of the settings.xml files. Once you installed a downloaded version you can choose Window -> Preferences -> Maven -> Installations, press Add... and point to the version you just installed.

这篇关于Spring Tool Suite中maven使用的settings.xml在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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