我正在使用one-jar插件生成一个胖jar文件。以下是我的Build.scala的样子:
import com.github.retronym.SbtOneJar
import sbt._
import Keys._
object build extends Build {
def standardSettings = Seq(
exportJars := true
) ++ Defaults.defaultSettings
lazy val metricsProducer = Project("metricsProducer",
file("beta"),
settings = standardSettings ++ SbtOneJar.oneJarSettings
)
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % "1.6.0",
"org.apache.kafka" %% "kafka" % "0.9.0.0"%,
"joda-time" % "joda-time" % "2.7" %,
"io.spray" %% "spray-json" % "1.3.2" %
)
}
当我尝试使用以下方式运行时:
sbt run one-jar
unresolved dependency: org.scala-sbt.plugins#sbt-onejar;0.8: not found
我在plugins.sbt中添加了依赖插件。有线索吗?