您可以在以下用例中使用tomcat7-maven-plugin:
<plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <path>/WebappName##${maven.build.timestamp}</path> <url>http://localhost:8080/manager/text</url> <username>tomcat</username> <password>tomcat</password> <update>true</update> </configuration> </plugin>如您所见
path,在此示例中,基于构建时间戳在元素中指定了版本。
当然,如果您不想让所有旧版本都运行,则仍然需要
undeployOldVersions="true"在server.xml
<Host>元素中使用。



