【问题标题】:Test jar dependency in Play?在 Play 中测试 jar 依赖项?
【发布时间】:2013-07-17 13:32:47
【问题描述】:

我有一个 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 的依赖?

【问题讨论】:

    标签: scala maven playframework


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-23
      • 1970-01-01
      • 2012-08-23
      • 2019-05-25
      相关资源
      最近更新 更多