1.修改tomcat7-maven-plugin-2.2.jar包git
從新下載這個包,並刪除maven自動下載的jar,手動放進去
請點擊下載 tomcat7-maven-plugin-2.2.jar
2.tomcat插件配置github
<plugins>
<!-- 配置Tomcat插件 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<port>8001</port>
<path>/</path>
<staticContextPath>/img</staticContextPath>
<staticContextDocbase>D:/images/</staticContextDocbase>
<contextReloadable>false</contextReloadable>
<useTestClasspath>true</useTestClasspath>
</configuration>
</plugin>
</plugins>apache