1

我想使用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?

4

2 回答 2

1

他们目前没有适用于 scala 2.10 的版本,因此您不能在配置中使用它

于 2013-05-04T10:49:03.183 回答
1

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

scalaVersion := 2.9.1

那应该工作。

也仅供参考,

Lifty 不再处于开发阶段。https://github.com/Lifty/lifty

于 2013-05-08T07:57:20.200 回答