Scala akka spray websocket模板生成错误
我在TypeSafe中使用这些模板时遇到了一个小问题,当我尝试在IntelliJ中导入它时,我收到以下错误消息:Scala akka spray websocket模板生成错误,scala,intellij-idea,sbt,spray,Scala,Intellij Idea,Sbt,Spray,我在TypeSafe中使用这些模板时遇到了一个小问题,当我尝试在IntelliJ中导入它时,我收到以下错误消息: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: io.spray#sbt-revo
[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的版本不正确,但我不知道如何修复它。你能给我一些处理那样问题的建议吗
谢谢
My 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
组织机构:=“cua.li”
版本:=“0.4”
规模规避:=“2.11.5”
libraryDependencies++={
val akkaV=“2.3.9”
val sprayV=“1.3.2”
val kamonV=“0.3.5”
序号(
“com.wandoulabs.akka”%%“spray websocket”%%“0.1.4”,带有Javadoc的sources(),
“io.spray”%%“spray json”%%“1.3.1”with sources()with javadoc,
“io.spray”%%“spray can”%sprayV with sources()with javadoc,
“io.spray”%%“sprayV with sources()with javadoc”,
“com.typesafe.akka”%%“akka演员”%akkaV with sources()with javadoc,
“com.typesafe.akka”%%“akka-slf4j”%akkaV with sources()with javadoc,
/*
“org.aspectj”%”aspectjweaver“%”1.8.4“with sources(),with javadoc,
“io.kamon”%%“kamon核心”%kamonV with sources()with javadoc,
“io.kamon”%%“kamon喷雾”%kamonV with sources()with javadoc,
“io.kamon”%%“kamon statsd”%kamonV with sources()with javadoc,
“io.kamon”%%“kamon日志报告程序”%kamonV with sources()with javadoc,
“io.kamon”%%“kamon系统度量”%kamonV with sources()with javadoc,
“io.kamon”%%“kamon测试工具包”%kamonV%%“测试”with sources(),with javadoc,
// */
“com.typesafe.akka”%%“akka测试工具包”%akkaV%%“test”with sources()with javadoc,
“io.spray”%%“spray测试工具包”%sprayV%%“测试”with sources(),with javadoc,
“org.scalatest”%%“scalatest”%%“2.2.3”%%“测试”,
“junit”%“junit”%“4.12”%“测试”,
“org.specs2”%%“specs2”%%“2.4.15”%%“测试”,
“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”)
编译中的文档可能缺少用于下载依赖项的存储库
请尝试将此置于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"
)
我也有过同样的问题,但只是sbt左轮手枪。我通过以下方法解决了这个问题:
我的SBT被设置为使用我的Artifactory实例来检索依赖项
1) 在Artifactory中,我将下面的存储库添加到“远程存储库”中,并使其成为“远程repos”虚拟存储库的一部分
2) 在我的~/.sbt/repositories文件中,我已经确保我的Artifactory存储库配置了正确的URL格式(请参见下面)。我从中获取了格式
与上述错误相同。[错误](*:更新)sbt.ResolveException:未解析的依赖项:io.spray#sbt revolver;0.7.2:未找到[错误]未解析的依赖项:com.typesafe.sbt#sbt aspectj;0.10.1:未找到[错误]未解析的依赖项:com.typesafe.sbteclipse#sbteclipse插件;2.5.0:未找到[错误]未解决的依赖项:com.timushev.sbt#sbt更新;0.1.7:未找到我只需加载模板并运行此解析程序:解析程序++=Seq(“类型安全存储库”位于“”,“喷洒存储库”位于“”,“Scalaz Bintray Repo”位于“”)缺少Scalaz Repo。我得到了一个新的依赖项错误:[error](*:update)sbt.ResolveException:未解析的依赖项:io.spray#sbt rev olver;0.7.2:未找到[错误]未解析的依赖项:com.typesafe.sbt#sbt aspectj;0.10.1:未找到[错误]未解析的依赖项:com.timushev.sbt#sbt更新;0.1.7:未找到
artifactory-ivy: http://my.artifactory.com:8081/artifactory/repo/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]