Maven works with Tomcat7 above in eclipse

Source: Internet
Author: User

The use of the Tomcat:run command in Maven uses the TOMCAT6 version by default, and now it needs to use WebSocket, which requires more than TOMCAT7 versions, and is configured in the Eclipse MAVEN project as follows


The first step: Add the following configuration to the project's POM:

     <pluginManagement>      <plugins>        <plugin>          <groupId>org.apache.tomcat.maven< /groupid>          <artifactId>tomcat6-maven-plugin</artifactId>          <version>2.3-SNAPSHOT< /version>        </plugin>        <plugin>          <groupId>org.apache.tomcat.maven</groupId>          <artifactId>tomcat7-maven-plugin</artifactId>          <version>2.3-snapshot</version >        </plugin>      </plugins>    </pluginManagement>
You can refer to the instructions on the official website http://tomcat.apache.org/maven-plugin-trunk/


Step two: When you start the project, run as--and Maven Build--Select the project path, goals write Tomcat7:run

Can be run


--------------------------------------------------------------------------------------------------------------- --

Just so simple, two steps, here are some of my projects:


To configure the POM:


Configuration Run Engineering:


Background output:


Page display:


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Maven works with Tomcat7 above in eclipse

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.