UNRESOLVED DEPENDENCIES error while trying to create jar

后端 未结 5 1304
萌比男神i
萌比男神i 2021-02-04 02:14

I\'m trying to build a Scala jar file to run it in spark.
I\'m following this tutorial.
when trying to build jar file using sbt as here, i\'m facing with following error

5条回答
  •  春和景丽
    2021-02-04 02:35

    How can you change the current dependencies? I mean, when you type sbt package for a build file like:

    name := "Simple Project"
    
    version := "1.0"
    
    scalaVersion := "2.10.4"
    
    libraryDependencies += "org.apache.spark" %% "spark-core" % "1.2.0"
    

    SBT will start resolving and downloading all kinds of dependencies. But if you see that it is failing on a dependency that is no longer inthe maven repo, what to do? Where can you change the dpencies it tries.

    @OP: The problem is that your SBT is outdated. If you downloaded it using apt, you can use apt to remove it as well. In any case, download the latest .tgz (not the .deb) and simply unpack it, after that add the /sbt/bin/ folder to your .bashrc I noticed that older SBT's (the .deb and apt-get versions) work with older scala versions. You either need to manually add or change the dependencies that the older SBT is trying to find or simply change to the latest (not sooo)SBT.

提交回复
热议问题