2014-01-21 50 views
0

SBT無法解決deadbolt依賴項之一:play-java_2.10;2.2.0SBT無法解決依賴問題:play-java_2.10; 2.2.0 for deadbolt(Scala)2.2-RC2

build.sbt內容:的project/plugins.sbt

name := "play-deadbolt" 

organization := "com.github.hanxue" 

version := "1.0" 

scalaVersion := "2.10.3" 

libraryDependencies += "be.objectify" %% "deadbolt-scala" % "2.2-RC2" 

內容:

// The Typesafe repository 
resolvers ++= Seq(
     Resolver.url("Objectify Play Repository", url("http://schaloner.github.io/releases/"))(Resolver.ivyStylePatterns)) 

// Use the Play sbt plugin for Play projects 
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0") 

注意,我曾嘗試加入resolversbuild.sbt而不是project/plugins.sbt,用同樣的錯誤。

這是當我運行sbt update

$ sbt update 
[info] Loading global plugins from /Users/hanxue/.sbt/0.13/plugins 
[info] Loading project definition from /private/tmp/plain-deadbolt/project 
[info] Set current project to play-deadbolt (in build file:/private/tmp/plain-deadbolt/) 
[info] Updating {file:/private/tmp/plain-deadbolt/}plain-deadbolt... 
[info] Resolving com.typesafe.play#play-java_2.10;2.2.0 ... 
[warn] module not found: com.typesafe.play#play-java_2.10;2.2.0 
[warn] ==== local: tried 
[warn] /Users/hanxue/.ivy2/local/com.typesafe.play/play-java_2.10/2.2.0/ivys/ivy.xml 
[warn] ==== public: tried 
[warn] http://repo1.maven.org/maven2/com/typesafe/play/play-java_2.10/2.2.0/play-java_2.10-2.2.0.pom 
[info] Resolving org.fusesource.jansi#jansi;1.4 ... 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: com.typesafe.play#play-java_2.10;2.2.0: not found 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
sbt.ResolveException: unresolved dependency: com.typesafe.play#play-java_2.10;2.2.0: not found 
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213) 
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122) 
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121) 
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116) 
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116) 
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:104) 
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:51) 
    at sbt.IvySbt$$anon$3.call(Ivy.scala:60) 
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98) 
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81) 
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102) 
    at xsbt.boot.Using$.withResource(Using.scala:11) 
    at xsbt.boot.Using$.apply(Using.scala:10) 
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62) 
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52) 
    at xsbt.boot.Locks$.apply0(Locks.scala:31) 
    at xsbt.boot.Locks$.apply(Locks.scala:28) 
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:60) 
    at sbt.IvySbt.withIvy(Ivy.scala:101) 
    at sbt.IvySbt.withIvy(Ivy.scala:97) 
    at sbt.IvySbt$Module.withModule(Ivy.scala:116) 
    at sbt.IvyActions$.update(IvyActions.scala:121) 
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1144) 
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1142) 
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1165) 
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1163) 
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35) 
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1167) 
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1162) 
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45) 
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1170) 
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1135) 
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1113) 
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47) 
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42) 
    at sbt.std.Transform$$anon$4.work(System.scala:64) 
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237) 
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237) 
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18) 
    at sbt.Execute.work(Execute.scala:244) 
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237) 
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237) 
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160) 
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
    at java.lang.Thread.run(Thread.java:724) 
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#play-java_2.10;2.2.0: not found 
[error] Total time: 3 s, completed Jan 22, 2014 12:02:53 AM 

我已經驗證,在http://schaloner.github.io/releases/be.objectify/deadbolt-scala_2.10/2.2-RC2/ivys/ivy.xml常春藤庫是有效的,具有以下內容會發生什麼:

<ivy-module xmlns:e="http://ant.apache.org/ivy/extra" version="2.0"> 
<info organisation="be.objectify" module="deadbolt-scala_2.10" revision="2.2-RC2" status="release" publication="20131027200616"> 
<description>deadbolt-scala</description> 
</info> 
<configurations> 
<conf name="compile" visibility="public" description=""/> 
<conf name="runtime" visibility="public" description="" extends="compile"/> 
<conf name="test" visibility="public" description="" extends="runtime"/> 
<conf name="provided" visibility="public" description=""/> 
<conf name="optional" visibility="public" description=""/> 
<conf name="sources" visibility="public" description=""/> 
<conf name="pom" visibility="public" description=""/> 
</configurations> 
<publications> 
<artifact name="deadbolt-scala_2.10" type="pom" ext="pom" conf="pom"/> 
<artifact name="deadbolt-scala_2.10" type="jar" ext="jar" conf="compile"/> 
<artifact name="deadbolt-scala_2.10" type="src" ext="jar" conf="sources" e:classifier="sources"/> 
</publications> 
<dependencies> 
<dependency org="org.scala-lang" name="scala-library" rev="2.10.2" conf="compile->default(compile)"/> 
<dependency org="com.typesafe.play" name="play_2.10" rev="2.2.0" conf="compile->default(compile)"/> 
<dependency org="com.typesafe.play" name="play-test_2.10" rev="2.2.0" conf="test->default(compile)"/> 
<dependency org="com.typesafe.play" name="play-cache_2.10" rev="2.2.0" conf="compile->default(compile)"/> 
<dependency org="be.objectify" name="deadbolt-core_2.10" rev="2.2-RC2" conf="compile->default(compile)"/> 
</dependencies> 
</ivy-module> 

難道這是由於PLAY- java缺少或在Typesafe存儲庫中移動?這是在http://repo.typesafe.com/typesafe/webapp/browserepo.html?0&pathId=ivy-releases:com.typesafe.sbteclipse

Typesafe Repository Browser

回答

3

以下build.sbt類型安全庫瀏覽器的截圖工作得很好解決"be.objectify" %% "deadbolt-scala" % "2.2-RC2"依賴性:

resolvers += Resolver.url("Objectify Play Repository", url("http://schaloner.github.com/releases/"))(Resolver.ivyStylePatterns) 

resolvers += Resolver.url("Objectify Play Snapshot Repository", url("http://schaloner.github.com/snapshots/"))(Resolver.ivyStylePatterns) 

resolvers += Resolver.typesafeRepo("releases") 

resolvers += Resolver.sonatypeRepo("releases") 

libraryDependencies += "be.objectify" %% "deadbolt-scala" % "2.2-RC2" 
+0

非常感謝您@Jazek!我認爲這是缺少的行'resolvers + = Resolver.typesafeRepo(「releases」)' – hanxue

+0

我在我的多個項目中添加了片段(Play不是主項目)build.sbt,它未能解析Objectify倉庫。我的ApplicationBuild.scala有以下行來定義lib,lazy val web = play.Project(「web」,path = file(「web」), settings = standardSettings ++ Seq(libraryDependencies ++ = Dependencies.authorization) )dependsOn(common,gui) 其中Dependencies.authorization = Seq(「be.objectify」%%「deadbolt-scala」%「2.2-RC2」) – thlim

+1

我把解析器設置(...)並解析問題。 – thlim