Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the settings.xml used by maven in the Spring Tool Suite?

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

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

  • The Maven install: $M2_HOME/conf/settings.xml
  • A user's install: ${user.home}/.m2/settings.xml

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 in advance

like image 539
isaac.hazan Avatar asked Feb 03 '14 20:02

isaac.hazan


People also ask

Where is settings xml in Maven?

The Maven settings file, settings. xml , is usually kept in the . m2 directory inside your home directory.

How do I change maven settings xml to STS?

Open your Eclipse and go to Window -> Preferences. Click on the Browse button of User Settings , and select the settings. xml. Click on the "Update Settings" button to update the settings.

What is settings xml in Maven project?

A Maven settings. xml file defines values that configure Maven execution in various ways. Most commonly, it is used to define a local repository location, alternate remote repository servers, and authentication information for private repositories.


1 Answers

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 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.

like image 91
Nicola Musatti Avatar answered Sep 29 '22 08:09

Nicola Musatti