如何配置我的SBT使用带有指定插件的插件?

时间:2013-05-04 10:38:34

标签: scala plugins version sbt lift

我想使用lifty插件,但无法在SBT中下载。

C:\Users\Freewind>sbt sbt-version
[info] 0.12.3
> console
Welcome to Scala version 2.9.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_04).

我按照lifty文档,将代码插入我的project/plugins.sbt

resolvers += Resolver.url("sbt-plugin-releases", 
    new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)

addSbtPlugin("org.lifty" % "lifty" % "1.7.4")

我的build.sbt

seq( Lifty.liftySettings : _*)

我在运行sbt时报告警告:

[warn]  module not found: org.lifty#lifty;1.7.4
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.lifty/lifty/scala_2.9.2/sbt_0.12/1.7.4/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/org.lifty/lifty/scala_2.9.2/sbt_0.12/1.7.4/ivys/ivy.xml
[warn] ==== local: tried
[warn]   X:\.sbt\local\org.lifty\lifty\scala_2.9.2\sbt_0.12\1.7.4\ivys\ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/org.lifty/lifty/scala_2.9.2/sbt_0.12/1.7.4/ivys/ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/lifty/lifty_2.9.2_0.12/1.7.4/lifty-1.7.4.pom

你可以看到它试图找到包含lifty\scala_2.9.2\sbt_0.12

的地方

但是从解析器中,我可以找到一个有效的网址:

http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/org.lifty/lifty/scala_2.9.1/sbt_0.11.2/1.7.4/

它仅支持scala_2.9.1sbt-0.11.2

如何更改我的配置以使用此指定版本的lifty?

2 个答案:

答案 0 :(得分:1)

目前他们没有scala 2.10的版本,所以你不能在配置中使用它

答案 1 :(得分:1)

在您的sbt构建定义文件build.sbt中,将scala版本更改为

scalaVersion := 2.9.1

应该有用。

另外,仅供参考,

生命不再在发展中。 https://github.com/Lifty/lifty