未解决的依赖:com.typesafe.play#play_2.10; 2.2.1

时间:2013-11-08 18:18:10

标签: playframework sbt

将我的播放框架版本更新为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

3 个答案:

答案 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