1
我正在使用maven構建多模塊項目。maven war插件執行和多模塊項目中的篩選
在一個項目中,我執行maven-war-plugin四次,以便在每次執行中過濾一些屬性。作爲一個獨立的項目,它運作良好。
但是,當我構建多模塊時,從「父」它執行四次,但沒有一個過濾屬性。
謝謝大家!
繼承人我的pom.xml的片段:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>net.my</groupId>
<artifactId>my-project</artifactId>
<packaging>war</packaging>
<name>myProject</name>
<version>0.0.1</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<id>list</id>
<phase>package</phase>
<goals>
<goal>war</goal>
</goals>
<configuration>
<warName>myProj-list.war</warName>
<webResources>
<resource>
<directory>src/main/webapp</directory>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</webResources>
<filtering>true</filtering>
<filters>
<filter>src/main/filters/list.properties</filter>
</filters>
</configuration>
</execution>
...
<!-- more executions -->
</execution>
</executions>
<configuration>
<webResources>
<resource>
<directory>src/main/webapp</directory>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</webResources>
<filters>
<filter>src/main/filters/locator.properties</filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>
你爲什麼過濾這麼多? – Salandur 2010-10-19 08:32:13
不錯,項目的需求......但它在單獨的模塊上運行正常,但不能在模塊中運行...... – ssedano 2010-10-19 08:53:09