【发布时间】:2012-12-31 08:08:39
【问题描述】:
我有一个用 Ant 构建的大型 Java 项目,我正在转换为 maven。
如何重新定义 webapp - web 资源的 maven 标准文件夹? 我无法移动网页内容,而且它始终处于积极开发中。
【问题讨论】:
标签: java maven web-applications
我有一个用 Ant 构建的大型 Java 项目,我正在转换为 maven。
如何重新定义 webapp - web 资源的 maven 标准文件夹? 我无法移动网页内容,而且它始终处于积极开发中。
【问题讨论】:
标签: java maven web-applications
【讨论】:
解决者
<!-- http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>${webapp-folder}</directory>
<excludes>
<exclude>**/*.jar</exclude>
</excludes>
</resource>
</webResources>
</configuration>
</plugin>
【讨论】: