Where does settings.xml live, for tomcat 7?
Asked Answered
N

1

8

In order to use the tomcat 7 manager (or mvn tomcat:deploy), I need to put a settings.xml file somewhere.

The file will contain the following:

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

Where does this file go?

Does it need to be explicitly referenced somewhere?

Nilgai answered 16/3, 2013 at 21:7 Comment(1)
use tomcat7:deploy. And have a look here [#13337316 [1]: #13337316Recent
D
13

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

There are two locations where a settings.xml file may live:

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

The former settings.xml are also called global settings, the latter settings.xml are referred to as user settings. If both files exists, their contents gets merged, with the user-specific settings.xml being dominant.

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

Datcha answered 16/3, 2013 at 21:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.