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.
当我尝试在Mac OS X Mavericks中使用光滑或光滑的Play框架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
I have tried clearing my ivy cache, running play clean
and adding different resolvers but nothing has worked.
我尝试清理我的常春藤缓存,运行play clean和添加不同的解析器,但是没有任何效果。
This is the build.sbt file:
这是构建。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
UPDATE: Looked into resolvers
更新:看着解析器
[play21-osm] $ show resolvers [info] List(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/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/artifact.[ext]), artifactPatterns=List(${ivy.home}/local/[organisation]/[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 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 resolvers [info]列表[font - family:宋体;mso - ascii - font - family: calibri; mso - ascii - theme - font: minor - latin; mso - fareast - theme - font: minor - fareast;m2/储存库,public: http://repo1.maven.org/maven2/, Typesafe发布储存库:http://repo.typesafe.com/typesafe/releaseseseseses/, Typesafe发布:http://typesafe.artiyonline.com/typesafe, pk11 repo: http://repo11 - ch.org.orgode.com/scratn/
3 个解决方案
#1
2
Quit Play Console, and make sure your build.sbt
looks like this:
停止播放控制台,并确保您的构建。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
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.
删除PLAY_HOME美元/仓库/缓存/ com.typesafe。浮油和PLAY_HOME美元/仓库/缓存/ com.typesafe.play / play-slick_2.10。如果您愿意,可以删除完整的缓存目录。
Run Play console again and execute update
followed by compile
.
再次运行播放控制台并执行更新,然后进行编译。
#2
0
Your slick dependency has the wrong group name. It should be com.typesafe.slick
instead of com.typesafe.play
:
您的灵活依赖项有错误的组名。它应该com.typesafe。浮油代替com.typesafe.play:
"com.typesafe.slick" %% "slick" % "2.0.0"
#3
0
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.
我认为我的sbt或ivy储存库已经损坏,这导致了它们的重建。
#1
2
Quit Play Console, and make sure your build.sbt
looks like this:
停止播放控制台,并确保您的构建。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
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.
删除PLAY_HOME美元/仓库/缓存/ com.typesafe。浮油和PLAY_HOME美元/仓库/缓存/ com.typesafe.play / play-slick_2.10。如果您愿意,可以删除完整的缓存目录。
Run Play console again and execute update
followed by compile
.
再次运行播放控制台并执行更新,然后进行编译。
#2
0
Your slick dependency has the wrong group name. It should be com.typesafe.slick
instead of com.typesafe.play
:
您的灵活依赖项有错误的组名。它应该com.typesafe。浮油代替com.typesafe.play:
"com.typesafe.slick" %% "slick" % "2.0.0"
#3
0
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.
我认为我的sbt或ivy储存库已经损坏,这导致了它们的重建。