How to deploy war to remote Tomcat or Jetty server by Maven

deployment, jetty, maven, tomcat

Solution

Maven is not intended to do deployment in the sense you are using it. Just use something different: Ant, Shellscript, Jenkins Jobs, Chef, Puppet or something similar.

Apart from that it is possible to do so by using the cargo-maven-plugin and other plugins.

Problem

I am looking a way for making production deployment automate. Deploy phase in maven is for repository deployment. How we can do production deployment when we are using Tomcat or Jetty as remote server? I am looking something like this: mvn deploy-site then after build maven deploy war to remote server

Original source