2
我試圖讓Maven過濾&複製用於測試的兩個文件。Maven:如何在EAR模塊中複製&過濾*測試*資源?
我試過把它們放在src/test/resources以及src/test/application中(如果它對src/main/application起作用similar)但沒有任何反應。
documentation對測試資源沒有任何說明。
提前致謝!
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-1</version>
<executions>
<execution>
<phase>initialize</phase>
<goals><goal>read-project-properties</goal></goals>
<configuration>
<files>
<file>${filter.build.props}</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<filtering>true</filtering>
<displayName>myapp</displayName>
<version>1.4</version>
<defaultJavaBundleDir>lib</defaultJavaBundleDir>
</configuration>
</plugin>
</plugins>
<filters>
<filter>${filter.build.props}</filter>
</filters>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>