【问题标题】:How do I declare SBT dependencies withSources that have test scope in published pom file?如何在已发布的 pom 文件中声明具有测试范围的 SBT 依赖项?
【发布时间】:2013-09-12 14:04:24
【问题描述】:

尝试发布时: https://github.com/thetrav/http-stub-server-scala/blob/master/project/build.scala

测试框架依赖项正在泄漏到运行时依赖项中。 我已将其范围缩小到这一行:

"org.scalatest" %% "scalatest" % "2.0.M5b" % "test" withSources(),

问题似乎是 withSources() 没有在测试范围内发布

有没有办法让我在测试和开发中获取源代码,而不是在运行时?

【问题讨论】:

    标签: scala maven testing dependencies sbt


    【解决方案1】:

    withSources 不推荐在 sbt 0.10+ 中使用。例如,IDE 插件使用updateClassifiers,它可以被其他执行类似操作的任务/插件使用。

    【讨论】:

      猜你喜欢
      • 2020-02-28
      • 1970-01-01
      • 1970-01-01
      • 2017-05-30
      • 2016-09-30
      • 2014-09-04
      • 1970-01-01
      • 2021-10-23
      • 2012-10-05
      相关资源
      最近更新 更多