我在build.sbt
的多项目布局上有以下内容。所有其他依赖项都很好地解决了,我刚开始使用项目的Kinesis部分。
我的build.sbt中有以下行:
libraryDependencies += "org.apache.spark" % "spark-streaming-kinesis-asl-assembly_2.10" % "2.0.0"
我收到此错误:
Error:Error while importing SBT project:
...
[error]
[error] spark-streaming-kinesis-asl: unable to get resource for org/codehaus/janino#janino;2.7.8: res=org.apache.spark/org/codehaus/janino/janino/2.7.8/janino-2.7.8.pom: java.net.MalformedURLException: no protocol: org.apache.spark/org/codehaus/janino/janino/2.7.8/janino-2.7.8.pom
[error] several problems occurred while resolving dependency: org.codehaus.janino#janino-parent;2.7.8 {}:
[error] spark-streaming-kinesis-asl: unable to get resource for org/codehaus/janino#janino-parent;2.7.8: res=org.apache.spark/org/codehaus/janino/janino-parent/2.7.8/janino-parent-2.7.8.jar: java.net.MalformedURLException: no protocol: org.apache.spark/org/codehaus/janino/janino-parent/2.7.8/janino-parent-2.7.8.jar
[error] spark-streaming-kinesis-asl: unable to get resource for org/codehaus/janino#janino-parent;2.7.8: res=org.apache.spark/org/codehaus/janino/janino-parent/2.7.8/janino-parent-2.7.8.pom: java.net.MalformedURLException: no protocol: org.apache.spark/org/codehaus/janino/janino-parent/2.7.8/janino-parent-2.7.8.pom
[error] spark-streaming-kinesis-asl: unable to get resource for org/codehaus/janino#janino-parent;2.7.8: res=org.apache.spark/org/codehaus/janino/janino-parent/2.7.8/janino-parent-2.7.8.jar: java.net.MalformedURLException: no protocol: org.apache.spark/org/codehaus/janino/janino-parent/2.7.8/janino-parent-2.7.8.jar
[error]
[error]
[error] unresolved dependency: com.google.http-client#google-http-client;1.19.0: several problems occurred while resolving dependency: com.google.http-client#google-http-client;1.19.0 {compile=[compile(*), master(*)], runtime=[runtime(*)]}:
[error] several problems occurred while resolving dependency: com.google.http-client#google-http-client-parent;1.19.0 {}:
[error] spark-streaming-kinesis-asl: unable to get resource for com/google/http-client#google-http-client-parent;1.19.0: res=org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.jar: java.net.MalformedURLException: no protocol: org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.jar
[error] spark-streaming-kinesis-asl: unable to get resource for com/google/http-client#google-http-client-parent;1.19.0: res=org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.pom: java.net.MalformedURLException: no protocol: org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.pom
[error] spark-streaming-kinesis-asl: unable to get resource for com/google/http-client#google-http-client-parent;1.19.0: res=org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.jar: java.net.MalformedURLException: no protocol: org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.jar
[error]
[error] spark-streaming-kinesis-asl: unable to get resource for com/google/http-client#google-http-client;1.19.0: res=org.apache.spark/com/google/http-client/google-http-client/1.19.0/google-http-client-1.19.0.pom: java.net.MalformedURLException: no protocol: org.apache.spark/com/google/http-client/google-http-client/1.19.0/google-http-client-1.19.0.pom
[error] several problems occurred while resolving dependency: com.google.http-client#google-http-client-parent;1.19.0 {}:
[error] spark-streaming-kinesis-asl: unable to get resource for com/google/http-client#google-http-client-parent;1.19.0: res=org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.jar: java.net.MalformedURLException: no protocol: org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.jar
[error] spark-streaming-kinesis-asl: unable to get resource for com/google/http-client#google-http-client-parent;1.19.0: res=org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.pom: java.net.MalformedURLException: no protocol: org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.pom
[error] spark-streaming-kinesis-asl: unable to get resource for com/google/http-client#google-http-client-parent;1.19.0: res=org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.jar: java.net.MalformedURLException: no protocol: org.apache.spark/com/google/http-client/google-http-client-parent/1.19.0/google-http-client-parent-1.19.0.jar
[error] Total time: 322 s, completed Dec 6, 2016 3:43:33 PM</pre><br/>See complete log in <a href="/Users/p2345716/Library/Logs/IntelliJIdea2016.3/sbt.last.log">/Users/p2345716/Library/Logs/IntelliJIdea2016.3/sbt.last.log</a>
答案 0 :(得分:0)
我通过修复依赖关系artifactID来实现它:
libraryDependencies += "org.apache.spark" % "spark-streaming-kinesis-asl-assembly" % "2.0.0"