1、pom.xml
在pom.xml中添加tomcat-maven-plugin插件信息。
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<port>8888</port>
<path>/</path>
</configuration>
</plugin>
</plugins>
</build>
如果没有下载到插件,导致报错,可添加仓库信息,确保maven可以下载到插件。
<repository>
<id>people.apache.snapshots</id>
<url> http://repository.apache.org/content/groups/snapshots-group/ </url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>