1. tomcat-maven-plugin plugin usage configuration
Add the following xml to pom.xm.
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.1</version> <configuration> <path>/wp</path> <port>8080</port> <uriEncoding>UTF-8</uriEncoding> <url>http://localhost:8080/manager/html</url> <server>tomcat6</server> </configuration> </plugin>
plugin usage
It should be noted here that the plug-in is named differently. For example, to start tomcat, the corresponding target command is: tomcat:run
2. tomcat7-maven-plugin use configuration
The usage of the two plugins is basically the same, and the plugin also needs to be referenced in pom.xml, and the following configuration needs to be added
<plugin>
<groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <port>9090</port> <path>/mgr</path> <uriEncoding>UTF-8</uriEncoding> <finalName>mgr finalName</> <server>tomcat7</server> </configuration> </plugin>
The specific configuration is the same.
plugin usage
It should be noted here that the plug-in is named differently. For example, to start tomcat, the corresponding target command is: tomcat7:run , and the same is true for other commands, which need to be changed to: tomcat7: <plug-in execution point>
reprint
The tomcat-maven-plugin plugin uses