2013-04-18 59 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 –