ovo*_*ovo 6 sbt sbt-native-packager
当我尝试使用sbt clean compile stage
以下方式暂存我的应用程序时,我收到错误:
[error] Not a valid command: stage
[error] Not a valid project ID: stage
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: stage
[error] stage
[error] ^
Run Code Online (Sandbox Code Playgroud)
我已经在其他机器上完成了数百次而没有任何问题.我有SBT 0.13.5 - 有没有人见过这个?我已经阅读了这篇文章,但我不是在Heroku上.谢谢.
Jac*_*ski 14
在上面的评论之后,我意识到你只是希望在stage
不带整个Play foo的情况下拥有命令.
该stage
命令是sbt-native-packager的一部分:
[插件]的目标是能够捆绑使用SBT构建的Scala软件,用于本机打包系统,如deb,rpm,homebrew,msi.
一项所述的SBT-本机打包器插件的特征是所述阶段命令即
> help stage
Create a local directory with all the files laid out as they would be in the final distribution.
Run Code Online (Sandbox Code Playgroud)
只需添加以下内容即可project/plugins.sbt
在项目中使用插件(在Muki的评论之后,示例使用带有autoplugin功能的最新版本1.0.0-M1):
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0-M1")
Run Code Online (Sandbox Code Playgroud)
您还必须将以下内容添加到build.sbt
:
enablePlugins(JavaAppPackaging)
Run Code Online (Sandbox Code Playgroud)
就是这样!你们现在都准备好了.
执行stage
.
> stage
[info] Packaging /Users/jacek/dev/sandbox/command-build-scala/target/scala-2.10/command-build-scala_2.10-0.1-SNAPSHOT-sources.jar ...
[info] Done packaging.
[info] Updating {file:/Users/jacek/dev/sandbox/command-build-scala/}command-build-scala...
[info] Wrote /Users/jacek/dev/sandbox/command-build-scala/target/scala-2.10/command-build-scala_2.10-0.1-SNAPSHOT.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Packaging /Users/jacek/dev/sandbox/command-build-scala/target/scala-2.10/command-build-scala_2.10-0.1-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info] Packaging /Users/jacek/dev/sandbox/command-build-scala/target/scala-2.10/command-build-scala_2.10-0.1-SNAPSHOT.jar ...
[info] Done packaging.
[success] Total time: 0 s, completed Nov 5, 2014 2:55:55 PM
Run Code Online (Sandbox Code Playgroud)