在Play中测试jar依赖?

时间:2013-07-18 14:23:08

标签: scala maven playframework

我有一个maven模块,它有一些用于测试源目录中的集成测试的公共代码。我构建了一个包含这些类的测试jar。

在Maven中我会使用以下内容(如http://maven.apache.org/guides/mini/guide-attached-tests.html中所述):

<dependency>
  <groupId>com.myco.app</groupId>
  <artifactId>foo</artifactId>
  <version>1.0-SNAPSHOT</version>
  <type>test-jar</type> <!-- this is the important part-->
  <scope>test</scope>
</dependency>

以便在另一个模块中使用它。

如何在Play(或SBT)中定义对test-jar的依赖?

1 个答案:

答案 0 :(得分:2)

您必须使用“测试”分类器,如此doc中所述:

"com.myco.app" % "foo" % "1.0-SNAPSHOT" % "test" classifier "tests"