2013-04-18 53 views
0

我试图运行升2.4 Web应用程序按照本教程http://scala-ide.org/docs/tutorials/lift24scalaide20/index.html如何使用SBT

的问题是如何运行这个程序(无论是在码头,Tomcat或运行升2.4 Web应用程序其他服务器)?!

我试图命令码头跑,但我得到这个错误:

> jetty-run 

[error] Not a valid command: jetty-run 
[error] Expected '/' 
[error] Expected ':' 
[error] Not a valid key: jetty-run (similar: run) 
[error] jetty-run 
[error]  ^

当我做容器:开始,我也得到了一个错误:

> container:start 

[error] Not a valid key: start (similar: state, target, start-year) 
[error] container:start 
[error] 

     ^

我的配置是:

文件 “build.sbt” 载:

name := "lift-basic" 

organization := "my.company" 

version := "0.1-SNAPSHOT" 

scalaVersion := "2.9.1" 

EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Resource 

libraryDependencies ++= { 
val liftVersion = "2.4" 
Seq(
"net.liftweb" %% "lift-webkit" % liftVersion % "compile", 
"net.liftweb" %% "lift-mapper" % liftVersion % "compile", 
"org.mortbay.jetty" % "jetty" % "6.1.26" % "test", 
"junit" % "junit" % "4.7" % "test", 
"ch.qos.logback" % "logback-classic" % "0.9.26", 
"org.scala-tools.testing" %% "specs" % "1.6.9" % "test", 
"com.h2database" % "h2" % "1.2.147" 
) 
} 

和文件 “名.bst /插件/ build.sbt” 载:

//Eclipse Plugin 

resolvers += Classpaths.typesafeResolver 

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.0.0") 

回答

1

这听起来像你需要安装xsbt-web-plugin插件sbt

指令可以在这里:https://github.com/JamesEarlDouglas/xsbt-web-plugin/wiki

这应该为您提供container:start以及jar包。

+1

此外,我会建议使用升降机应用程序的主要“起点”:https://github.com/lift/lift_25_sbt/ 它是最新的,它的工作没有问题。 – VasyaNovikov

+0

事实上,我的问题集中在Lift-2.4上,因为他们说在教程中用这个命令来部署你的应用程序:jetty-run 但对我来说它不起作用?! 对于Lift-2.5,它对容器起作用很大:start –