1. My TOMCAT7
Modify Tomcat-users.xml under Config file
Tomcat-users.xml content is as follows:
<role rolename= "Manager-gui"/>
<role rolename= "Admin-gui"/>
<role rolename= "Manager-script"/>
<user username= "Tomcat" password= "Tomcat" roles= "Manager-script,manager-gui,admin-gui"/>
Modify Setting.xml under 2maven Config folder
<servers>
<!--add a test server--
<server>
<id>tomcat</id>
<username>tomcat</username>
<password>tomcat</password>
</server>
</servers>
The ID here will be used (corresponding to the service in 3)
3. Add in the Pom.xml file of your project
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<url>http://127.0.0.1:8080/manager/text</url>
<server>tomcat</server>
<username>tomcat</username>
<password>tomcat</password>
</configuration>
</plugin>
</plugins>
</build>
4. Right-click the Pom.xml file under Project Run as-"Maven build ... Golals option to fill out the package Tomcat:redeploy click Run
See console output
BUILD success was successful.
(and then there's a little bit of your tomcat that needs to run first in the fourth step of the operation)
Maven Tomcat Configuration