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