【发布时间】:2016-04-14 18:25:38
【问题描述】:
在我的项目中,我创建了以下目录结构
src
-> main
-> java
-> resources
-> test
-> java
-> resources
-> integration-test
-> java
-> resources
在我的 pom.xml 中我做了以下条目
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.17</version>
<configuration>
<testSourceDirectory>src/integration-test/java</testSourceDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
如果我在 src->test->resources 中复制资源,它会自动成功复制到 /target/test-classes。但是,如果我将文件复制到 /src/integration-test/resources 中,那么它不会在构建时复制到目标/测试类中。
如何使集成测试也将资源内的文件复制到目标中?
【问题讨论】:
标签: java maven maven-failsafe-plugin