使用 sbt 0.11.0 安装 Scala 2.9.1/Lift 2.4-M4
我正在学习使用 Scala 进行 Web 开发。目前正在尝试在 MAC OSX 中安装最新版本的 Scala/lift 和 sbt 0.11。到目前为止我已经完成了以下操作:
1.安装Scala 2.9.1 Final
2.从 https://github.com/harrah/xsbt/wiki/Setup< 下载最新的 sbt 0.11 /a>
3. 设置 sbt 的路径环境
我现在想做的是从 http:/ 获取最新的 lift 框架 (2.4-M4) /liftweb.net/download 这样我就可以尝试使用 jetty 在 localhost:8080 上运行 lift_basic 项目。我对此有几个问题;
从 sbt 0.11 开始,我必须这样做:
解析器 += “Web 插件存储库”,位于“http://siasia.github.com/maven2” addSbtPlugin("com.github.siasia" %% "xsbt-web-plugin" % "0.1.2")
我应该将对象解析器放在哪里(查看下面的代码),而不是执行
libraryDependency += ...
,以便我能够安装 jetty 和 web 插件?那么,在 lift_basic 文件夹下,它们应该进入 Project/build/LiftProject.Scala 还是只是删除 LiftProject.scala 并在 Project/Build.scala 下创建 Build.scala?对象解析器{ val webPluginRepo = “Web 插件存储库”位于“http://siasia.github.com/maven2” val jettyRepo = “Jetty Repo”位于“http://repo1.maven.org/maven2/org/mortbay/jetty” }
对象依赖关系{ // 网页插件 val webPluginDeps = Seq( "org.mortbay.jetty" % "jetty" % "6.1.26" % "jetty", // 最后一部分是“jetty”而不是“test”。 “javax.servlet”%“servlet-api”%“2.5”%“提供->默认” )
我应该如何处理 lift_basic 文件夹中现有的 sbt.jar?看起来那里有旧版本的 sbt(可能是 7.4.0 左右)..
除了在 Build.properties 上将 sbt 版本更改为 0.11.0 之外,我还需要进行哪些其他更改来适应这个新安装?我是否必须在完整配置上更改 Build.scala 上的
var BuildScalaVersion
和var buildVersion
,如示例 https://github.com/harrah/xsbt/wiki/Full-Configuration-Example 在这里吗?如果是,构建版本是什么?
我是 Scala 的新手,并且没有很多用于安装新的 scala/lift 版本的文档。将不胜感激任何能让我安装新版本的 scala/lift 的指针/参考/答案。感谢您抽出时间。
I am learning to do web development in Scala. currently trying to install the newest version of Scala/lift with sbt 0.11 in MAC OSX. I so far have already done the following:
1. Installed Scala 2.9.1 final
2. Downloaded latest sbt 0.11 from https://github.com/harrah/xsbt/wiki/Setup
3. Setup path environment for sbt
What I am trying to do now is getting the latest lift framework (2.4-M4)from http://liftweb.net/download so that I can try running lift_basic project on localhost:8080 using jetty. I have several questions about that;
Since on the sbt 0.11 I will have to do this:
resolvers += "Web plugin repo" at "http://siasia.github.com/maven2"
addSbtPlugin("com.github.siasia" %% "xsbt-web-plugin" % "0.1.2")instead of doing
libraryDependencies += ...
where should I put my object resolvers (checkout the following code below) that would enable me to install both the jetty and web plugin? so, under lift_basic folder should they go within Project/build/LiftProject.Scala or just delete LiftProject.scala and create Build.scala under Project/Build.scala?object Resolvers {
val webPluginRepo = "Web plugin repo" at "http://siasia.github.com/maven2"
val jettyRepo = "Jetty Repo" at "http://repo1.maven.org/maven2/org/mortbay/jetty"
}object Dependencies { // web plugin val webPluginDeps = Seq( "org.mortbay.jetty" % "jetty" % "6.1.26" % "jetty", // The last part is "jetty" not "test". "javax.servlet" % "servlet-api" % "2.5" % "provided->default" )
What should I do with the sbt.jar existing inside the lift_basic folder? It looks like that it has the old version of sbt there (probably 7.4.0 or so)..
Besides changing the sbt version to 0.11.0 on the Build.properties, what other changes do I need to make to accomodate this new install? Do I have to change the
var BuildScalaVersion
andvar buildVersion
on the Build.scala on the full configuration like the example https://github.com/harrah/xsbt/wiki/Full-Configuration-Example here? If yes, what would be the build version?
I am a total newbie to Scala, and there hasnt been a lot of documentations out there for installing new scala/lift version. will appreciate any pointers/references/answers that would enable me to install new version of scala/lift. Thank you for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以尝试看看我的项目模板。也许会有帮助。 https://github.com/viktortnk/lift-quickstart
You can try to look at my project template. Maybe It will be helpful. https://github.com/viktortnk/lift-quickstart