如何在sbt中添加设置

时间:2014-04-22 19:21:32

标签: scala sbt

如何预先设置SBT设置?

++= 追加。什么预先

(背景:我想在我的Play项目的Typesafe之前放置不同的解析器。)

1 个答案:

答案 0 :(得分:3)

你可以将值设置为给定的解析器+旧的,这样旧的值都会在搜索队列的后面。

对于build.sbt:

resolvers := ("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2") +: resolvers.value

对于Build.scala,尝试类似:

lazy val root = Project("myproject", file("."))
    .settings(otherSettings: _*)
    .settings(resolvers := ("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2") +: resolvers.value)