Maven Tomcat Configuration

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.