Where does settings.xml live for tomcat 7?

To use tomcat 7 manager (or mvn tomcat:deploy ), I need to place settings.xml somewhere.

The file will contain the following:

 <server> <id>myserver</id> <username>myusername</username> <password>mypassword</password> </server> 

Where does this file go?

Is there any need to explicitly refer somewhere?

+6
source share
1 answer

The settings.xml file is part of the maven settings and is not specific to tomcat, although the tomcat-maven module uses the servers defined there.

There are two places where the settings.xml file can be:

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

Previous settings.xml are also called global settings, recent settings.xml are called user settings. If both files exist, their contents are combined, and the user settings.xml parameters are dominant.

You can find the exact syntax for defining servers in the documentation.

+9
source

All Articles