今天做項目時,想改進用maven內置tomcat,配pom如下
<build>
<finalName>spring-shiro</finalName>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8085</port>
<path>/</path>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
結果報錯[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
網上搜了很多,

都沒有用,仔細核對發現,還是pom配錯的緣故

多了
<pluginManagement>導致的,去掉就好
如果能幫到各位,請點個贊
