在一个国外的论坛上找到的答案
http://tomcat.apache.org/maven-plugin-2.2/(apache官网有介绍)
groupId and Mojo name change
Since version 2.0-beta-1 tomcat mojos has been renamed to tomcat6 and tomcat7 with the same goals.
You must configure your pom to use this new groupId:
<pluginManagement> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat6-maven-plugin</artifactId> <version>2.2</version> </plugin> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> </plugin> </plugins> </pluginManagement>
Or add the groupId in your settings.xml(增加下面这段后正常)
<pluginGroups> .... <pluginGroup>org.apache.tomcat.maven</pluginGroup> .... </pluginGroups>