2015-01-14 26 views
5

所以我一直在嘗試使用parboiled2過去的幾個星期,它可能是最困難的依賴添加到構建我在我的整個生活中遇到過。我現在的錯誤是編譯sbt assembly)錯誤:Parboiled2導致「加載類文件'Prepender.class'時檢測到缺失或無效的依賴關係」

[error] missing or invalid dependency detected while loading class file 'Prepender.class'. 
[error] Could not access type PrependAux in package shapeless, 
[error] because it (or its dependencies) are missing. Check your build definition for 
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.) 
[error] A full rebuild may help if 'Prepender.class' was compiled against an incompatible version of shapeless. 
[error] .../Main.scala:56: could not find implicit value for parameter prepender: spray.routing.Prepender[shapeless.HNil,shapeless.::[String,shapeless.HNil]] 
[error]  path(searchSegment/Segment)(title => get(responder(complete(
[error]      ^

看來,這是根本不可能進行噴霧和Parboiled2發揮好起來。

我試過sbt clean並刪除我的target目錄。我的build文件基本上是這樣的:

resolvers ++= Seq(
    "spray repo" at "http://repo.spray.io" 
) 

val akkaV = "2.3.6" 
val sprayV = "1.3.2" 

libraryDependencies ++= Seq(
    // If I comment this line, everything works fine. 
    "org.parboiled" %% "parboiled" % "2.0.1" withSources() withJavadoc(), 
    // 
    "org.scalacheck" %% "scalacheck" % "1.12.1" % "test" withSources() withJavadoc(), 
    "org.specs2" %% "specs2-core" % "2.4.15" % "test" withSources() withJavadoc(), 
    "org.specs2" %% "specs2-scalacheck" % "2.4.15" % "test" withSources() withJavadoc(), 
    "org.scalaz" %% "scalaz-core" % "7.1.0" 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(), 
    "io.spray" %% "spray-testkit" % sprayV % "test" withSources() withJavadoc(), 
    // 
    "com.typesafe.akka" %% "akka-actor" % akkaV withSources() withJavadoc(), 
    "com.typesafe.akka" %% "akka-testkit" % akkaV % "test" withSources() withJavadoc() 
) 

scalaVersion := "2.11.4" 

javaOptions ++= Seq("-target", "1.8", "-source", "1.8") 

sbtVersion是0.13.6,我sbt-assembly版本是0.12.0

升級到2.11,提升我specs2依賴關係之前,我得到:parboiled2 and Spray cause conflicting cross-version suffixes

回答

相關問題