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>

 

使用:

posted @ 2015-12-08 12:28  hrhguanli  阅读(798)  评论(0编辑  收藏  举报