unresolved dependency: com.typesafe.play#play-slick_2.10;0.6.0.1: not found

后端 未结 3 411
滥情空心
滥情空心 2021-01-20 18:59

I am getting unresolved dependencies errors when trying to use slick or play-slick with Play Framework 2.2.2, sbt 0.13.0 and Scala 2.10.3 on Mac OS X Mavericks.

<         


        
相关标签:
3条回答
  • 2021-01-20 19:20

    Your slick dependency has the wrong group name. It should be com.typesafe.slick instead of com.typesafe.play:

    "com.typesafe.slick" %% "slick" % "2.0.0"
    
    0 讨论(0)
  • 2021-01-20 19:21

    Very hard to tell if this really was what fixed the problem but it is now working for me.

    cd ~
    brew uninstall sbt
    brew uninstall play
    mv .sbt .sbtold
    mv .ivy2 .ivy2old
    brew install sbt
    brew install play
    sbt
    play 
    
    sbt clean
    

    I think that my sbt or ivy repositories had become corrupted and this resulted in them being rebuilt.

    0 讨论(0)
  • 2021-01-20 19:33

    Quit Play Console, and make sure your build.sbt looks like this:

    name := "Test"
    
    version := "1.0-SNAPSHOT"
    
    libraryDependencies ++= Seq(
      jdbc,
      anorm,
      cache,
      "com.typesafe.slick" %% "slick" % "2.0.0",
      "com.typesafe.play" %% "play-slick" % "0.6.0.1"
    )
    
    play.Project.playScalaSettings
    

    Delete $PLAY_HOME/repository/cache/com.typesafe.slick and $PLAY_HOME/repository/cache/com.typesafe.play/play-slick_2.10. You may want to delete complete cache directory if you like to.

    Run Play console again and execute update followed by compile.

    0 讨论(0)
提交回复
热议问题