我正在尝试install sbt-assembly by following the instructions,以便制作一个可以在没有安装scala的计算机上运行的独立jar。
到目前为止,这些是我采取的步骤。
我创建了一个plugins.sbt文件:
$ cat sbt/project/plugins.sbt
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.7.2")我在build.sbt文件的开头添加了以下内容:
$ head -n3 sbt/build.sbt
import AssemblyKeys._ // put this at the top of the file
seq(assemblySettings: _*)但是当我运行sbt时,我得到了以下错误:
sbt/build.sbt:1: error: not found: value AssemblyKeys
import AssemblyKeys._ 发布于 2011-12-14 00:40:17
确保你周围没有一个项目/插件文件夹。这可能会阻止其他指定插件的机制工作。
发布于 2011-12-13 18:28:28
你不应该将插件设置导入build.sbt (basic configuration):1) build.sbt不是一个普通的Scala源文件;2)插件设置是预先导入的。
所以你只需要这样做
seq(assemblySettings: _*)只有在使用full/extended build configuration时才需要导入。
https://stackoverflow.com/questions/8470889
复制相似问题