Mik*_*rov 3 scala jar lift sbt
我的Lift项目我有一个名为的文件LiftConsole.scala.它由项目创建脚本生成,包含以下内容
import _root_.bootstrap.liftweb.Boot
import _root_.scala.tools.nsc.MainGenericRunner
object LiftConsole {
def main(args : Array[String]) {
// Instantiate your project's Boot file
val b = new Boot()
// Boot your project
b.boot
// Now run the MainGenericRunner to get your repl
MainGenericRunner.main(args)
// After the repl exits, then exit the scala script
exit(0)
}
}
Run Code Online (Sandbox Code Playgroud)
看来这个文件的目的是让用户在项目中与控制台进行交互.我喜欢这样,但我从来没能做到这一点,因为我找不到MainGenericRunner的jar.有谁知道从哪里得到它?
我的目标是能够初始化控制台将所有项目设置,以便我可以执行项目特定的代码.
它是其中的一部分scala-compiler.jar.您可以使用Scala分发的其余部分找到它.将此添加到您的项目:
val scalaCompiler = "org.scala-lang" % "scala-compiler" % "2.8.1"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2853 次 |
| 最近记录: |