除非我遗漏了什么,否则 Play mini 根本不像一个游戏项目。它在 sbt 中运行,你不能使用 play 命令。
https://github.com/typesafehub/play2-mini
那么如何将这些东西部署到生产环境中呢?我也尝试过一个罐子和组装,但它对我不起作用
我尝试了 start-script/stage 方法,但它似乎找不到我的主类:
sbt
>add-start-script-tasks
>stage
[info] Wrote start script for mainClass := None to /Users/rmedlin/rtbv2/target/start
这是我的 Build.scala。我也尝试过:mainClass in (Compile, stage, run)等多种组合
object Build extends Build {
override lazy val settings = super.settings
lazy val root = Project(id = "rtbv2",
base = file("."), settings = Project.defaultSettings).settings(
resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/",
resolvers += "Typesafe Snapshot Repo" at "http://repo.typesafe.com/typesafe/snapshots/",
libraryDependencies += "com.typesafe" %% "play-mini" % "2.0.1",
mainClass in (Compile, run) := Some("play.core.server.NettyServer"))
}