【问题标题】:SBT not producing jar fileSBT 不生成 jar 文件
【发布时间】:2017-03-01 16:32:37
【问题描述】:

我正在使用 SBT 来管理依赖项。代码编译如下,但没有生成jar文件。

有趣的是,今天早些时候,SBT 在 /target/spark-2.1/ 目录中生成了一个 jar 文件。现在它只更新类。我无法弄清楚我做错了什么。

$ sbt compile
[info] Set current project to Spark for Beginners (in build file:/tmp/Scala3/)
[info] Compiling 1 Scala source to /tmp/Scala3/target/scala-2.11/classes...
[success] Total time: 10 s, completed Mar 1, 2017 5:25:29 PM

请帮帮我。

【问题讨论】:

    标签: java scala sbt


    【解决方案1】:

    你之前有没有打过电话

    sbt package 
    

    compile 命令只编译源而不打包它们。在这里查看可能的 sbt 命令列表:http://www.scala-sbt.org/0.13/docs/Combined+Pages.html#Running

    【讨论】:

    • 谢谢,哈拉德。你拯救了这一天。
    • 不客气!请问您也可以接受答案吗?
    猜你喜欢
    • 2017-04-15
    • 2017-10-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-20
    • 1970-01-01
    • 1970-01-01
    • 2015-02-25
    相关资源
    最近更新 更多