未解决的依赖:com.typesafe.play#play-slick_2.10; 0.6.0.1:未找到

时间:2014-04-27 14:00:50

标签: scala playframework sbt slick play-slick

尝试在Mac OS X Mavericks上使用Play Framework 2.2.2,sbt 0.13.0和Scala 2.10.3进行光滑或播放时,我得到了未解决的依赖项错误。

[info] Updating {file:/Users/michaelrichardson/Documents/Play/glasgowEffect/}glasgoweffect...
[info] Resolving com.typesafe.play#slick_2.10;2.0.0 ...
[warn]  module not found: com.typesafe.play#slick_2.10;2.0.0
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/typesafe/play/slick_2.10/2.0.0/slick_2.10-2.0.0.pom
[info] Resolving com.typesafe.play#play-slick_2.10;0.6.0.1 ...
[warn]  module not found: com.typesafe.play#play-slick_2.10;0.6.0.1
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/typesafe/play/play-slick_2.10/0.6.0.1/play-slick_2.10-0.6.0.1.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.play#slick_2.10;2.0.0: not found
[warn]  :: com.typesafe.play#play-slick_2.10;0.6.0.1: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#slick_2.10;2.0.0: not found
[error] unresolved dependency: com.typesafe.play#play-slick_2.10;0.6.0.1: not found
[error] Total time: 7 s, completed Apr 27, 2014 2:58:48 PM

我已经尝试清除我的常春藤缓存,运行play clean并添加不同的解析器,但没有任何效果。

这是build.sbt文件:

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

更新:查看解析器

[play21-osm] $ show resolvers [info]列表(Typesafe Releases Repository:http://repo.typesafe.com/typesafe/releases/,Typesafe Releases:http://typesafe.artifactoryonline.com/typesafe,pk11 repo:http://pk11-scratch.googlecode.com/svn/trunk) [play21-osm] $ show externalResolvers [info] ArrayBuffer(FileRepository(local,FileConfiguration(true,None),Patterns(ivyPatterns = List($ {ivy.home} / local / [organization] / [module] /(scala_ [scalaVersion] /)(sbt_ [sbtVersion] ] /)[revision] / [type] s / artifact。[ext]),artifactPatterns = List($ {ivy.home} / local / [organization] / [module] /(scala_ [scalaVersion] /)(sbt_ [ sbtVersion] /)[revision] / [type] s / artifact。[ext]),isMavenCompatible = false)),Maven2 Local:file:/Users/mr/.m2/repository,public: http://repo1.maven.org/maven2/,Typesafe发布存储库:http://repo.typesafe.com/typesafe/releases/,Typesafe版本:http://typesafe.artifactoryonline.com/typesafe,pk11 repo:http://pk11-scratch.googlecode.com/svn/trunk

3 个答案:

答案 0 :(得分:2)

退出Play控制台,确保build.sbt看起来像这样:

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

删除$PLAY_HOME/repository/cache/com.typesafe.slick$PLAY_HOME/repository/cache/com.typesafe.play/play-slick_2.10。如果您愿意,可能需要删除完整的缓存目录。

再次运行Play控制台并执行update,然后执行compile

答案 1 :(得分:0)

您的slick依赖项具有错误的组名。它应该是com.typesafe.slick而不是com.typesafe.play

"com.typesafe.slick" %% "slick" % "2.0.0"

答案 2 :(得分:0)

很难说这是否真的解决了这个问题,但它现在正在为我工​​作。

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

sbt clean

我认为我的sbt或ivy存储库已经损坏,导致它们被重建。