play framework: Modules were resolved with conflicting cross-version suffixes

1.5k Views Asked by At

i want to use elastic search with play framework so i followed this guide

Here is my build.sbt file

name := """es-with-play"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.1"

libraryDependencies ++= Seq(
  jdbc,
  anorm,
  cache,
  ws,
  "com.clever-age" % "play2-elasticsearch" % "1.4-SNAPSHOT"
)

resolvers +=   "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

and in play console when I compile the code it gives following errors

[error] Modules were resolved with conflicting cross-version suffixes in {file:/media/sara/New%20Volume/programs/programs/play/es-with-play/}root:
[error]    com.jsuereth:scala-arm _2.11, _2.10
[error]    com.typesafe.play:play-functional _2.11, _2.10
[error]    com.typesafe.akka:akka-actor _2.11, _2.10
[error]    com.typesafe.play:play-json _2.11, _2.10
[error]    com.typesafe.play:play _2.11, _2.10
[error]    com.typesafe.play:play-iteratees _2.11, _2.10
[error]    com.typesafe.akka:akka-slf4j _2.11, _2.10
[error]    org.scala-stm:scala-stm _2.11, _2.10
[error]    com.typesafe.play:play-datacommons _2.11, _2.10
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) Conflicting cross-version suffixes in: com.jsuereth:scala-arm, com.typesafe.play:play-functional, com.typesafe.akka:akka-actor, com.typesafe.play:play-json, com.typesafe.play:play, com.typesafe.play:play-iteratees, com.typesafe.akka:akka-slf4j, org.scala-stm:scala-stm, com.typesafe.play:play-datacommons
[error] Total time: 10 s, completed Dec 16, 2014 2:22:39 PM

I am using play 2.3 and scala version is 2.11.1 and elasticsearch-1.4.1 Please help me how can i solve this error

1

There are 1 best solutions below

0
On

You are using Play 2.3, but the github page states that play2-elasticsearch 1.4 is only compatible with Play 2.2. Furthermore, it seems as if there's no version available yet that is compiled against Scala 2.11 (see this issue). So, I guess you'd need to downgrade to Play 2.2.1 and Scala 2.10 or try the workaround mentioned in the github issue by using excludes.