我使用mvn install
在本地安装了一个文件mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file -Dfile=c:\shared\kafka-0.7.2-spark.jar -DgroupId=org.apache.kafka -DartifactId=kafka -Dversion=0.7.2-spark -Dpackaging=jar
现在,当运行 sbt package 时,会显示一条相当混乱的消息:成功但也未找到:
[info] Resolving org.apache.kafka#kafka;0.7.2-spark ...
[info] downloading file:/C:/Users/S80035683//.m2/repository/org/apache/kafka/kafka/0.7.2-spark/kafka-0.7.2-spark.jar ...
[info] [SUCCESSFUL ] org.apache.kafka#kafka;0.7.2-spark!kafka.jar (9ms)
[warn] [NOT FOUND ] org.apache.kafka#kafka;0.7.2-spark!kafka.jar(src) (1ms)
[warn] ==== Local Repo: tried
[warn] file:/C:/Users/S80035683//.m2/repository/org/apache/kafka/kafka/0.7.2-spark/kafka-0.7.2-spark-sources.jar
[info] downloading file:/C:/Users/S80035683//.m2/repository/net/sf/py4j/py4j/0.7/py4j-0.7.jar ...
[info] [SUCCESSFUL ] net.sf.py4j#py4j;0.7!py4j.jar (7ms)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.apache.kafka#kafka;0.7.2-spark!kafka.jar(src)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: download failed: org.apache.kafka#kafka;0.7.2-spark!kafka.jar(src)
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:104)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:51)
at sbt.IvySbt$$anon$3.call(Ivy.scala:60)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
答案 0 :(得分:0)
三个小字母: src
[警告] [未找到] org.apache.kafka #kafka; 0.7.2-spark!kafka.jar **(src)**(1ms)
我在LibraryDependencies
中指定了 withSourceslibraryDependencies ++= Seq(
..
"org.apache.kafka" % "kafka" % "0.7.2-spark"
withSources // here is the culprit!
)
我已经评论过了
libraryDependencies ++= Seq(
..
"org.apache.kafka" % "kafka" % "0.7.2-spark"
// withSources
)
现在构建