Maven tomcat插件配置和使用
pom.xml组态
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<path>/cxx</path>
<port>8989</port>
<uriEncoding>UTF-8</uriEncoding>
<url>http://localhost:8989/manager/html</url>
<server>tomcat6</server>
</configuration>
</plugin>
</plugins>
<finalName>cxx</finalName>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.sql</include>
<include>**/*.ftl</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/java</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.sql</include>
<include>**/*.ftl</include>
</includes>
<filtering>false</filtering>
</testResource>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
</build>
使用: