Search code examples
scalascalatest

unresolved dependency: com.artima.supersafe#supersafe_2.12.4;1.1.3: not found


I am trying to use scala test and write:

resolvers += "Artima Maven Repository" at "http://repo.artima.com/releases"
addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.3")

into plugins.sbt and build.sbt looks as following:

libraryDependencies ++= Seq(
  "org.scalactic" %% "scalactic" % ScalaTest,
  "org.scalatest" %% "scalatest" % ScalaTest % "test"
)

SBT complains:

Error:Error while importing SBT project:<br/>...<br/><pre>[error]   at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:118)
[error]     at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2353)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[error]     at sbt.std.Transform$$anon$4.work(System.scala:64)
[error]     at sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]     at sbt.Execute.work(Execute.scala:266)
[error]     at sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[error]     at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167)
[error]     at sbt.CompletionService$$anon$2.call(CompletionService.scala:32)
[error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]     at java.lang.Thread.run(Thread.java:748)
[error] (*:update) sbt.librarymanagement.ResolveException: unresolved dependency: com.artima.supersafe#supersafe_2.12.4;1.1.3: not found
[error] (*:ssExtractDependencies) sbt.librarymanagement.ResolveException: unresolved dependency: com.artima.supersafe#supersafe_2.12.4;1.1.3: not found
[error] Total time: 4 s, completed Nov 23, 2017 1:58:40 PM</pre><br/>See complete log in <a href="file:/home/developer/.IntelliJIdea2017.2/system/log/sbt.last.log">file:/home/developer/.IntelliJIdea2017.2/system/log/sbt.last.log</a>

What am I doing wrong?


Solution

  • Try adding the resolver to the sbt global, as suggested in https://www.artima.com/supersafe_user_guide.html

    Add the Artima Maven Repository as a resolver in ~/.sbt/0.13/global.sbt, like this:

    resolvers += "Artima Maven Repository" at "http://repo.artima.com/releases"
    

    I had it in the build.sbt file and moving it as per their instructions solved the issue for me. Good luck!