Publish the JAVEEE project to Tomcat via the MAVEN plugin

Source: Internet
Author: User

1, modify the Tomcat\conf\tomcat-users.xml file, add in the file

<rolename= "Manager-script"/><username  = "admin"  password= "1"  roles= "Manager-script"/> 

2. Introduction of Tomcat7-maven-plugin plugin in Pom.xml file

<Build>  <Plugins>    <!--remote Tomcat Deployment plug-in -    <!--goals:1, tomcat7:deploy,2, package Tomcat7:redeploy -    <plugin>       <groupId>Org.apache.tomcat.maven</groupId>       <Artifactid>Tomcat7-maven-plugin</Artifactid>       <version>2.2</version>       <Configuration>       <uriencoding>UTF-8</uriencoding>       <URL>Http://127.0.0.1:8080/manager/text</URL>       <username>Admin</username>       <Password>1</Password>       </Configuration>    </plugin>  </Plugins></Build>

Url:tomcat Publishing Address

Urername: User name added in step 1

Password: User password added in step 1

3. Start Tomcat.

4. Execute "Run As>maven build ..." in Eclipse. If the project is not deployed in Tomcat, enter "Tomcat7:deploy" in goals and execute "Tomcat7:redeploy" if it is already deployed in Tomcat

Some associated plugins will be downloaded when the command is first executed, please wait patiently. After successful deployment, you will be prompted with the following:

5, the deployment method is a hot deployment, the deployment is complete, you can access the application.

Description

Tomcat version: apache-tomcat-8.0.38, apache-tomcat-8.5.6

Eclipse Version: eclipse-jee-neon-1a-win32-x86_64

Publish the JAVEEE project to Tomcat via the MAVEN plugin

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.