Before using Maven and ant to compile the project, say nothing about using Jenkins's plug-in to automatically deploy the project
1. First Jenkins installs the plugin Deploy to container Plugin, as: Https://wiki.jenkins-ci.org/display/JENKINS/Deploy+Plugin
2. After installation, you will see the options in the project configuration
3. Configure the Tomcat remote deployment account to add the following configuration to the Tomcat-users.xml file within the Conf file in the Tomcat directory
<rolename= "Manager-gui"/><rolename = "Manager-script"/><username= "Tomcat" Password = "Tomcat" Roles = "Manager-gui,manager-script" />
4. Configure Jenkins
Of course, to deploy multiple tomcat, add a container by clicking Add Container
5. The configuration is complete, each time the compilation is completed, it will publish itself to the appropriate Web container, and automatically restart the service.
Automatically deploy projects to Tomcat using the Jenkins plugin