Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse 如何使用sbt运行Lift-2.4 web应用程序_Eclipse_Scala_Jetty_Sbt_Lift - Fatal编程技术网

Eclipse 如何使用sbt运行Lift-2.4 web应用程序

Eclipse 如何使用sbt运行Lift-2.4 web应用程序,eclipse,scala,jetty,sbt,lift,Eclipse,Scala,Jetty,Sbt,Lift,根据本教程,我正在尝试运行Lift-2.4 web应用程序 问题是如何运行此应用程序(在jetty、tomcat或其他服务器上) 我正在尝试运行jetty命令,但出现以下错误: > jetty-run [error] Not a valid command: jetty-run [error] Expected '/' [error] Expected ':' [error] Not a valid key: jetty-run (similar: run) [error] jetty-

根据本教程,我正在尝试运行Lift-2.4 web应用程序

问题是如何运行此应用程序(在jetty、tomcat或其他服务器上)

我正在尝试运行jetty命令,但出现以下错误:

> 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时,我还遇到了一个错误:

> 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"
)
}
//Eclipse Plugin

resolvers += Classpaths.typesafeResolver

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.0.0")
文件“.sbt/plugins/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"
)
}
//Eclipse Plugin

resolvers += Classpaths.typesafeResolver

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

听起来您需要为
sbt
安装
xsbt web插件

有关说明,请参见:


这将为您提供
容器:start
以及jar包装

另外,我建议对lift应用程序使用主“起点”:它更为最新,而且工作没有问题。事实上,我的问题集中在lift-2.4上,因为在教程中,他们说使用以下命令部署应用程序:jetty run,但对我来说它不起作用?!对于Lift-2.5,它与container:start非常配合