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