- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试开始使用 Lift 框架,阅读 Lift in Action。我想跟随示例,但我立即偶然发现了安装 Lift 的问题。我知道有多种方法可以轻松开始使用 Lift,但我想像本书一样使用 Lifty,以便能够遵循它。
问题是 Lifty 和 sbt
(还有Lift!)自这本书出版以来一直在进步。我安装了 sbt
来自 Ubuntu 的 Typesafe 存储库。现在我被困在尝试安装 Lifty。
关注 Lifty documentation和 this answer on SO - 由于 Lifty 尚未发布 sbt
的二进制文件0.11.3 - 我想我应该将以下内容放入 ~/.sbt/plugins/build.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")
libraryDependencies +=
Defaults.sbtPluginExtra(
"org.lifty" % "lifty" % "1.7.4",
"0.11.2",
"2.9.1"
)
sbt
为 sbt 0.11.2 使用 Lifty 插件。
sbt
似乎可以下载 Lifty 并正确启动,但我没有
lifty
命令。所以当我做
lifty learn lift https://raw.github.com/Lifty/lifty/master/lifty-recipe/lifty.json
sbt
提示:
[error] Not a valid key: lifty (similar: history)
[error] lifty learn lift https://raw.github.com/Lifty/lifty/master/lifty-recipe/lifty.json
[error] ^
sbt
来安装 Lifty 0.7.7.但是如果我这样做
> lift create project-blank
> reload
> update
[error] sbt.ResolveException: unresolved dependency: net.liftweb#lift-webkit_2.9.1;2.3-RC3: not found
[error] unresolved dependency: org.scala-tools.testing#specs_2.9.1;1.6.6: not found
[info] == update ==
[error] Error running update: sbt.ResolveException: unresolved dependency: net.liftweb#lift-webkit_2.9.1;2.3-RC3: not found
[error] unresolved dependency: org.scala-tools.testing#specs_2.9.1;1.6.6: not found
最佳答案
我不想打破它给你,但升力已经不见了。在撰写本文时,sbt 的稳定值为 0.13.0。看着 sbt community repo ,唯一发布的版本是 1.7.4 for sbt 0.11.2。
official website说:
The Lift Cookbook is the most up-to-date resource to learn how to use Lift.
Problem
You want want to create a Lift web project from scratch without using the ZIP files provided on the official Lift website.
Solution
You will need to configure SBT and the Lift project yourself. Luckily, only five small files are needed.First, create an SBT plugin file at
project/plugins.sbt
(all filenames are given relative to the project root directory):addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.3.0")
This file tells SBT that you will be using the xsbt-web-plugin.
Next, create an SBT build file, build.sbt...
project/plugins.sbt
放:
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.4.2")
resolvers += Resolver.sonatypeRepo("public")
我能够按照页面上的其余说明进行操作...
> container:start
[info] Compiling 1 Scala source to /foo/sbt-lift-test/target/scala-2.10/classes...
[info] jetty-8.1.7.v20120910
....
[success] Total time: 2 s, completed Sep 20, 2013 10:34:22 PM
开通
http://localhost:8080/
使用浏览器:
Welcome, you now have a working Lift installation
关于scala - Lift 和 Lifty 入门,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11741812/
我正在尝试开始使用 Lift 框架,阅读 Lift in Action。我想跟随示例,但我立即偶然发现了安装 Lift 的问题。我知道有多种方法可以轻松开始使用 Lift,但我想像本书一样使用 Lif
我是一名优秀的程序员,十分优秀!