2015-02-05 21 views
0

我用從類型安全的,這些模板有點問題,當我嘗試導入它的IntelliJ我獲得以下消息的錯誤:阿卡噴霧的WebSocket模板生成錯誤

[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: io.spray#sbt-revolver;0.7.2: not found 
[warn] :: com.typesafe.sbt#sbt-aspectj;0.10.1: not found 
[warn] :: com.typesafe.sbteclipse#sbteclipse-plugin;2.5.0: not found 
[warn] :: com.timushev.sbt#sbt-updates;0.1.7: not found 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] 
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes. 
[warn]  io.spray:sbt-revolver:0.7.2 (sbtVersion=0.13, scalaVersion=2.10) 
[warn]  com.typesafe.sbt:sbt-aspectj:0.10.1 (sbtVersion=0.13, scalaVersion=2.10) 
[warn]  com.typesafe.sbteclipse:sbteclipse-plugin:2.5.0 (sbtVersion=0.13, scalaVersion=2.10) 
[warn]  com.timushev.sbt:sbt-updates:0.1.7 (sbtVersion=0.13, scalaVersion=2.10) 
[warn] 
[warn] Note: Unresolved dependencies path: 
[warn]  io.spray:sbt-revolver:0.7.2 (sbtVersion=0.13, scalaVersion=2.10) (C:\Users\jlopesde\akka-spray-websocket\project\plugins.sbt#L1-2) 
[warn]  +- default:akka-spray-websocket-build:0.1-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.10) 
[warn]  com.typesafe.sbt:sbt-aspectj:0.10.1 (sbtVersion=0.13, scalaVersion=2.10) (C:\Users\jlopesde\akka-spray-websocket\project\plugins.sbt#L3-4) 
[warn]  +- default:akka-spray-websocket-build:0.1-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.10) 
[warn]  com.typesafe.sbteclipse:sbteclipse-plugin:2.5.0 (sbtVersion=0.13, scalaVersion=2.10) (C:\Users\jlopesde\akka-spray-websocket\project\plugins.sbt#L5-6) 
[warn]  +- default:akka-spray-websocket-build:0.1-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.10) 
[warn]  com.timushev.sbt:sbt-updates:0.1.7 (sbtVersion=0.13, scalaVersion=2.10) (C:\Users\jlopesde\akka-spray-websocket\project\plugins.sbt#L7-8) 
[warn]  +- default:akka-spray-websocket-build:0.1-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.10) 
sbt.ResolveException: unresolved dependency: io.spray#sbt-revolver;0.7.2: not found 
unresolved dependency: com.typesafe.sbt#sbt-aspectj;0.10.1: not found 
unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;2.5.0: not found 
unresolved dependency: com.timushev.sbt#sbt-updates;0.1.7: not found 
[error] (*:update) sbt.ResolveException: unresolved dependency: io.spray#sbt-revolver;0.7.2: not found 
[error] unresolved dependency: com.typesafe.sbt#sbt-aspectj;0.10.1: not found 
[error] unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;2.5.0: not found 
[error] unresolved dependency: com.timushev.sbt#sbt-updates;0.1.7: not found 

我知道有一個導入它的問題,可能是Spray或Scala版本不正確,但我不知道如何解決它。你能否提供一些處理這類問題的技巧?

感謝

我build.sbt:

organization := "cua.li" 

version  := "0.4" 

scalaVersion := "2.11.5" 

libraryDependencies ++= { 
    val akkaV = "2.3.9" 
    val sprayV = "1.3.2" 
    val kamonV = "0.3.5" 
    Seq(
    "com.wandoulabs.akka" %% "spray-websocket"  % "0.1.4"   withSources() withJavadoc, 
    "io.spray"   %% "spray-json"   % "1.3.1"   withSources() withJavadoc, 
    "io.spray"   %% "spray-can"    % sprayV   withSources() withJavadoc, 
    "io.spray"   %% "spray-routing"   % sprayV   withSources() withJavadoc, 
    "com.typesafe.akka" %% "akka-actor"   % akkaV    withSources() withJavadoc, 
    "com.typesafe.akka" %% "akka-slf4j"   % akkaV    withSources() withJavadoc, 
    /* 
    "org.aspectj"   % "aspectjweaver"   % "1.8.4"   withSources() withJavadoc, 
    "io.kamon"   %% "kamon-core"   % kamonV   withSources() withJavadoc, 
    "io.kamon"   %% "kamon-spray"   % kamonV   withSources() withJavadoc, 
    "io.kamon"   %% "kamon-statsd"   % kamonV   withSources() withJavadoc, 
    "io.kamon"   %% "kamon-log-reporter" % kamonV   withSources() withJavadoc, 
    "io.kamon"   %% "kamon-system-metrics" % kamonV   withSources() withJavadoc, 
    "io.kamon"   %% "kamon-testkit"   % kamonV % "test" withSources() withJavadoc, 
    // */ 
    "com.typesafe.akka" %% "akka-testkit"   % akkaV % "test" withSources() withJavadoc, 
    "io.spray"   %% "spray-testkit"   % sprayV % "test" withSources() withJavadoc, 
    "org.scalatest"  %% "scalatest"    % "2.2.3" % "test", 
    "junit"    % "junit"     % "4.12" % "test", 
    "org.specs2"   %% "specs2"    % "2.4.15" % "test", 
    "ch.qos.logback"  % "logback-classic"  % "1.1.2" 
) 
} 

scalacOptions ++= Seq("-deprecation", "-encoding", "UTF-8", "-feature", "-target:jvm-1.7", "-unchecked", 
    "-Ywarn-adapted-args", "-Ywarn-value-discard", "-Xlint") 

javacOptions ++= Seq("-Xlint:deprecation", "-Xlint:unchecked", "-source", "1.7", "-target", "1.7", "-g:vars") 

doc in Compile <<= target.map(_/"none") 

publishArtifact in (Compile, packageSrc) := false 

logBuffered in Test := false 

Keys.fork in Test := false 

parallelExecution in Test := false 

seq(Revolver.settings: _*) 

import com.typesafe.sbt.SbtAspectj._ 

aspectjSettings 

fork in run := true 

javaOptions <++= AspectjKeys.weaverOptions in Aspectj 

回答

2

可能缺少資源庫下載的依賴關係。

儘量把這個libraryDependencies前:

resolvers ++= Seq(
    "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/", 
    "Spray repository" at "http://repo.spray.io/", 
    "Scalaz Bintray Repo" at "http://dl.bintray.com/scalaz/releases" 
) 
+0

同樣的錯誤。 [錯誤](*:update)sbt.ResolveException:無法解析的依賴項:io.spray#sbt-revolver; 0.7.2:未找到 [錯誤] unresolved dependency:com.typesafe.sbt#sbt-aspectj; 0.10.1:未找到 [錯誤]未解決的依賴項:com.typesafe.sbteclipse#sbteclipse-plugin; 2.5.0:未找到 [錯誤]未解決的依賴項:com.timushev.sbt#sbt-updates; 0.1.7:未找到 – 2015-02-06 20:12:29

+0

I剛剛下載中心模板,並把這個解析器來運行: 解析器++ = SEQ( 「類型安全庫」的「http://repo.typesafe.com/typesafe/releases/」, 「噴霧庫」在「HTTP: 「」Scalaz Bintray Repo「在」http://dl.bintray.com/scalaz/releases「 ) 錯過了Scalaz回購。這對我有效。 – ThiagoA1 2015-02-09 18:54:50

+0

我會再試一次,謝謝。 – 2015-02-10 13:05:47

0

我有同樣的問題,但只有SBT-左輪手槍。我已經成功做以下來解決它:

我SBT被設置爲使用我的Artifactory的實例,以便檢索相關性。

1)在Artifactory的我添加存儲庫下面的「遠程存儲庫」,並使其在「遠程回購」虛擬存儲庫的一部分。

http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases

2)在我的〜/名.bst /庫文件,我確信我的Artifactory的存儲庫配置了正確的URL格式(請參見下文)。我採用了SBT's documentation的格式。如上

artifactory-ivy: http://my.artifactory.com:8081/artifactory/repo/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]