Use of the Maven Tomcat plugin

Source: Internet
Author: User

Using MAVEN's Tomcat plug-in in Eclipse to package the war package requires the following configuration in the Pom.xml file, which is the installation of the Tomcat plugin for MAVEN, which differs from the traditional packaging and deployment: the traditional installation of Tomcat locally The project is then deployed locally and the Tomcat plugin using MAVEN does not need to install Tomcat locally to run directly


With this configuration, you need to configure the output path after packaging, and packaging method, I hit the war package, so configured as follows:<outputdirectory> refers to the output path, if not configured, the default output to the target directory


Below you can click the Run as button to execute the Maven install command


The results are as follows


To see if there are qq.war packages in the corresponding path.


There is.


now running can be run directly using Tomcat7:run and the following operations :





The results are as follows:


Why the error, try a regular deployment, there is no problem, look at the wrong information, find the wrong location




It is clear that there is a jar package conflict:



With two Servlet_api jar packages, look at the hierarchical dependencies


Originally


Depends on the SERVLET-API, now remove it, need the following configuration

Use of the Maven Tomcat 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.