将我的播放框架版本更新为2.2.1
C:\>where play
C:\apps\play-2.2.1\play
C:\apps\play-2.2.1\play.bat
在执行构建时,我收到以下错误,如下所示。
sbt.ResolveException: unresolved dependency: com.typesafe.play#play_2.10;2.2.1: not found
答案 0 :(得分:5)
添加:
resolvers += "Typesafe repository" at
"http://repo.typesafe.com/typesafe/releases/"
到project/plugins.sbt
,并确保您的顶级build.sbt
有此行:
playScalaSettings
我不知道有什么理由需要比这更复杂,就像你自己的回答一样。
答案 1 :(得分:2)
通过在Resolvers.scala
中输入以下条目来解决:
import sbt._
import scala.xml.XML
object Resolvers {
/*
# Online play 2.2.0 repository
#
*/
val onLinePlayRepo = "Online Play Repository" at
"https://private-repo.typesafe.com/typesafe/maven-releases/play/"
val remResolvers = Seq(localMaven,
localIvy,
localPlay,
sonatypeReleases,
sonatypePublic,
typesafeSnapshots,
typesafeReleases,
mavenRepository,
mavenRepositoryOne,
onLinePlayRepo)
还在build.sbt中添加了以下条目。
import sbt._
resolvers += "Online Play Repository" at
"http://repo.typesafe.com/typesafe/simple/maven-releases/"
答案 2 :(得分:0)
如果您在代理后面,则应将https代理设置为http代理。
<强> HTTPS 强>
-Dhttps.proxyHost=host -Dhttps.proxyPort=port
<强> HTTP 强>
-Dhttp.proxyHost=host -Dhttp.proxyPort=port