Unknown artifact sbtplugin Super safe compiler with scala 2.12

十年热恋 提交于 2020-01-24 05:47:14

问题


In my sbt project in Scala 2.12 I am using IntelliJ IDEA and want to import scalatest. In order to install the recommended SuperSafe Community Edition Scala compiler plugin. I followed the instruction here.

My plugin.sbt:

addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.2")

the error showed by the Intellij import is:

        SBT project import
        [warn]  [FAILED     ] com.artima.supersafe#sbtplugin;1.1.2!sbtplugin.jar(src):  (0ms)
        [warn] ==== typesafe-ivy-releases: tried
        [warn]   https://repo.typesafe.com/typesafe/ivy-releases/com.artima.supersafe/sbtplugin/scala_2.10/sbt_0.13/1.1.2/srcs/sbtplugin-sources.jar
        [warn] ==== sbt-plugin-releases: tried
        [warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.artima.supersafe/sbtplugin/scala_2.10/sbt_0.13/1.1.2/srcs/sbtplugin-sources.jar
        [warn] ==== local: tried
        [warn]   /Users/salvob/.ivy2/local/com.artima.supersafe/sbtplugin/scala_2.10/sbt_0.13/1.1.2/srcs/sbtplugin-sources.jar
        [warn] ==== public: tried
        [warn]   https://repo1.maven.org/maven2/com/artima/supersafe/sbtplugin_2.10_0.13/1.1.2/sbtplugin-1.1.2-sources.jar
        [warn] ==== Artima Maven Repository: tried
        [warn]   http://repo.artima.com/releases/com/artima/supersafe/sbtplugin_2.10_0.13/1.1.2/sbtplugin-1.1.2-sources.jar
        [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
        [warn]  ::              FAILED DOWNLOADS     ... 

Maybe incompatility with new Scala Version?


回答1:


Try the following:

  • When we add the plug-in in projects/build.sbt:

    addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.2")

  • We must not add the above plug-in anywhere else
  • Add to ~/.sbt/0.13/global.sbt

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

  • Do not add this resolver anywhere else
  • Make sure you have an empty line before and after each of the sbt lines

    HTHs



来源:https://stackoverflow.com/questions/42226004/unknown-artifact-sbtplugin-super-safe-compiler-with-scala-2-12

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!