Category Archives: Maven

Maven remote deploy

Remote deploy to a Tomcat Server using Maven 3

1. Install maven tomcat7 plugin (you need manager application in tomcat7 – comes by default)

 

2. Configure maven settings.xml in ~/.m2/ (or the place where maven is reading settings.xml)

 

3. Configure tomcat users in /usr/share/apache-tomcat-7.0.39/conf/tomcat-users.xml

 

4. Execute Maven goals

 

5. Tips and Tricks

It is preferable to have a maven profile for each server (DEV, TEST, PROD), in case you have database connections and servers are different. In this way, your war file will be build with predefined IP addresses and parameters for each particular deploy.