我正在尝试将kafka添加到播放应用程序(使用typesafe activator版本1.3.2)。
下面我列出了我的 build.sbt
文件。我从kafka的faq中复制了如何获取一个play应用程序的kafka依赖项
构建.sbt
name := """Test"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
javaJdbc,
javaEbean,
cache,
javaWs
)
resolvers += "Apache repo" at "https://repository.apache.org/content/repositories/releases"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
"joda-time" % "joda-time" % "2.2",
"org.joda" % "joda-convert" % "1.3.1",
"ch.qos.logback" % "logback-classic" % "1.0.13",
"org.mashupbots.socko" % "socko-webserver_2.9.2" % "0.2.2",
"nl.grons" % "metrics-scala_2.9.2" % "3.0.0",
"com.codahale.metrics" % "metrics-core" % "3.0.0",
"io.backchat.jerkson" % "jerkson_2.9.2" % "0.7.0",
"com.amazonaws" % "aws-java-sdk" % "1.3.8",
"net.databinder.dispatch" %% "dispatch-core" % "0.11.2",
"org.apache.kafka" % "kafka_2.9.2" % "0.8.2.1" excludeAll (
ExclusionRule(organization = "com.sun.jdmk"),
ExclusionRule(organization = "com.sun.jmx"),
ExclusionRule(organization = "javax.jms"),
ExclusionRule(organization = "org.slf4j")
)
)
编译时出现以下错误:
[error] com.typesafe.akka:akka-actor _2.11, <none>
[error] com.typesafe.akka:akka-slf4j _2.11, <none>
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) Conflicting cross-version suffixes in: com.typesafe.akka:akka-actor, com.typesafe.akka:akka-slf4j
1条答案
按热度按时间lvjbypge1#
看起来wiki已经过时了,尤其是没有使用sbt
%%
基于scala的依赖关系的符号。由于您有一个scala2.11.1项目,我转而使用
%%
而不是显式的scala版本,并且还更新了所有依赖项(一些旧版本没有scala2.11的版本)。尝试使用以下依赖项: