sbt unresolved dependency for spark-cassandra-connector 2.0.2

前端 未结 1 1743
鱼传尺愫
鱼传尺愫 2021-01-26 11:05

build.sbt:

val sparkVersion = \"2.1.1\";

libraryDependencies += \"org.apache.spark\" %% \"spark-core\" % sparkVersion % \"provided\";
libraryDependencies += \"o         


        
相关标签:
1条回答
  • 2021-01-26 11:20

    This is caused by "com.datastax.spark" % "spark-cassandra-connector" % "2.0.2"; without scala version, see maven repo:

    http://search.maven.org/#artifactdetails%7Ccom.datastax.spark%7Cspark-cassandra-connector_2.11%7C2.0.2%7Cjar

    There are 2 solutions for this:

    1. "com.datastax.spark" % "spark-cassandra-connector_2.11" % "2.0.2" explicitly set Scala version for dependency
    2. "com.datastax.spark" %% "spark-cassandra-connector" % "2.0.2", use %% with artifact id, this way, the SBT will auto base on your project's scala version to expand to the solution 1.
    0 讨论(0)
提交回复
热议问题