【发布时间】:2015-07-21 16:32:37
【问题描述】:
我想从另一个模块添加测试资源。
我的测试运行正常
<testResources>
<testResource>
<directory>DEPENDENCY_A/src/main/resources</directory>
</testResource>
</testResources>
DEPENDENCY_A 有 pom 打包,但是,我的测试不能通过将其添加为 test-pom-dependency 来获得相同的外部资源。
<dependency>
<groupId>DEPENDENCY_A</groupId>
<artifactId>DEPENDENCY_A</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
请帮助 :) 如何在单元测试中访问 DEPENDENCY_A 中的资源?也许我在 Java 基础知识中遗漏了一些明显的东西:(
【问题讨论】:
-
看起来是重复的。看到这个stackoverflow.com/questions/2247199/…
标签: maven