maven-web项目配置打包
配置maven 打包插件
<!-- 打包 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<!-- <configuration>
<webResources>
<resource>
<directory>webapp</directory>
</resource>
</webResources>
</configuration> -->
</plugin>
完整示例
<build>
<finalName>filemanager</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<!-- 指定端口 -->
<port>8000</port>
<!-- 请求路径 -->
<path>/filemanager</path>
</configuration>
</plugin>
<!-- 打包 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<!-- <configuration>
<webResources>
<resource>
<directory>webapp</directory>
</resource>
</webResources>
</configuration> -->
</plugin>
</plugins>
</build>