我嘗試將播放版本從2.3遷移到2.4.0,我遇到了一個錯誤「sbt.IncompatiblePluginsException:檢測到插件中的二進制不兼容「 我使用sbt版本的0.13.8.Java版本是8,任何人都可以建議我該怎麼做。
我會附上錯誤發生在控制檯從2.3遷移播放2.4:sbt.IncompatiblePluginsException:檢測到插件中的二進制不兼容
[error] sbt.IncompatiblePluginsException: Binary incompatibility in plugins dete
cted.
[error] Note that conflicts were resolved for some dependencies:
[error] org.apache.commons:commons-compress
[error] org.tukaani:xz
[error] com.google.guava:guava
[error] com.typesafe:config
[error] org.slf4j:slf4j-api
[error] org.fusesource.leveldbjni:leveldbjni
[error] com.typesafe:jse_2.10
[error] com.typesafe.sbt:sbt-js-engine
[error] com.typesafe.sbt:sbt-web
[error] org.javassist:javassist
[error] org.scala-sbt:launcher-interface
[error] org.scala-sbt:interface
[error] org.scala-sbt:io
[error] org.scala-sbt:collections
[error] org.scala-sbt:control
[error] Use 'last' for the full log.
這裏是我的 「build.sbt」
import sbtbuildinfo.Plugin._
import com.typesafe.config._
import sbt._
import Keys._
//import dbConfig.driver.api._
import play.Play.autoImport._
import com.typesafe.sbt.packager.archetypes.ServerLoader.{SystemV, Upstart}
serverLoading in Debian := SystemV
name := "vHMS"
version := "1.0-SNAPSHOT"
sbtPlugin := true
libraryDependencies ++= Seq(
javaJdbc,
//javaEbean,
javaWs,
filters,
cache,
specs2 % Test,
"org.springframework" % "spring-context" % "3.2.6.RELEASE",
"org.springframework" % "spring-context-support" % "3.2.6.RELEASE",
"org.springframework" % "spring-core" % "3.2.6.RELEASE",
"org.springframework" % "spring-beans" % "3.2.6.RELEASE",
"org.springframework" % "spring-orm" % "3.2.6.RELEASE",
"org.springframework" % "spring-jdbc" % "3.2.6.RELEASE",
"org.springframework" % "spring-tx" % "3.2.6.RELEASE",
"org.springframework" % "spring-expression" % "3.2.6.RELEASE",
"org.springframework" % "spring-aop" % "3.2.6.RELEASE",
"org.springframework" % "spring-test" % "3.2.6.RELEASE" % "test",
"org.json"%"org.json"%"chargebee-1.0",
"org.sql2o" % "sql2o" % "1.5.2",
"mysql" % "mysql-connector-java" % "5.1.18",
"org.mindrot" % "jbcrypt" % "0.3m",
"org.modelmapper" % "modelmapper" % "0.7.1",
"com.sun.jersey"% "jersey-client" % "1.17.1",
"com.sun.jersey"% "jersey-core" % "1.17.1",
"com.sun.jersey.contribs"% "jersey-multipart" % "1.17.1",
"com.rabbitmq" % "amqp-client" % "2.7.1",
"aopalliance" % "aopalliance" % "1.0",
"cglib" % "cglib" % "3.1",
"org.aspectj" % "aspectjrt" % "1.8.1",
"org.aspectj" % "aspectjweaver" % "1.8.1",
"commons-logging" % "commons-logging" % "1.1.1",
"commons-dbcp" % "commons-dbcp" % "1.4",
"net.vz.mongodb.jackson" %% "play-mongo-jackson-mapper" % "1.1.0",
"org.springframework.retry" % "spring-retry" % "1.1.0.RELEASE",
"org.springframework.amqp" % "spring-amqp" % "1.4.5.RELEASE",
"org.springframework.amqp" % "spring-rabbit" % "1.4.5.RELEASE",
"com.google.code.gson" % "gson" % "2.2.4",
"com.google.apis" % "google-api-services-storage" % "v1-rev20-1.19.0",
"com.google.api-client" % "google-api-client" % "1.19.0",
"com.google.http-client" % "google-http-client" % "1.19.0",
"com.google.http-client" % "google-http-client-jackson2" % "1.19.0",
"com.google.oauth-client" % "google-oauth-client" % "1.19.0",
"com.google.oauth-client" % "google-oauth-client-java6" % "1.19.0",
"com.google.oauth-client" % "google-oauth-client-jetty" % "1.19.0",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.1.3",
"org.mortbay.jetty" % "jetty" % "6.1.26",
"org.mortbay.jetty" % "jetty-util" % "6.1.26",
"commons-beanutils" % "commons-beanutils" % "1.8.3",
"org.jasypt" % "jasypt-spring31" % "1.9.0",
"org.jasypt" % "jasypt" % "1.8",
"org.apache.commons" % "commons-email" % "1.2",
"commons-codec" % "commons-codec" % "1.5",
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.5.1",
"com.itextpdf" % "itextpdf" % "5.5.0",
"com.itextpdf" % "itext-pdfa" % "5.5.0",
"net.sf.jasperreports" % "jasperreports" % "6.0.0",
"net.sf.jasperreports" % "jasperreports-fonts" % "6.0.0",
"org.apache.commons" % "commons-digester3" % "3.2",
"org.apache.poi" % "poi" % "3.9",
"dom4j" % "dom4j" % "1.6.1",
"antlr" % "antlr" % "2.7.6",
"javax.transaction" % "jta" % "1.1",
"org.slf4j" % "slf4j-log4j12" % "1.5.8",
"javassist" % "javassist" % "3.9.0.GA",
"tomcat" % "jasper-compiler-jdt" % "5.5.15",
"org.apache.commons" % "commons-io" % "1.3.2",
"org.imgscalr" % "imgscalr-lib" % "4.2",
"com.sandinh" %% "play-hikaricp" % "1.7.1",
"org.webjars" %% "webjars-play" % "2.3.0",
"com.typesafe" %% "play-plugins-mailer" % "2.2.0",
"org.webjars" % "jquery" % "2.1.0-2",
"org.webjars" % "bootstrap" % "3.1.1",
"org.webjars" % "angularjs" % "1.2.26",
"com.fizzed" %% "fizzed-play-module-sprockets" % "1.2.0"
//"com.typesafe.play" %% "play-slick" % "1.1.1"
//"com.typesafe.play" %% "play-slick-evolutions" % "1.1.1"
//"com.h2database" % "h2" % "1.3.175"
)
buildInfoSettings
sourceGenerators in Compile <+= buildInfo
buildInfoPackage := "App"
//pipelineStages in Assets := Seq(concat)
//includeFilter in closure := "all.js"
pipelineStages := Seq(uglify,digest,gzip)
includeFilter in (Assets, LessKeys.less) := "*.less"
lazy val root = project.in(file(".")).enablePlugins(PlayJava, SbtWeb)
//Enable eban plugin for 2.4 migration
lazy val myProject = (project in file(".")).enablePlugins(PlayJava, PlayEbean)
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion)
lazy val execTask = taskKey[Unit]("Execute the build task")
execTask := {
val file: File = baseDirectory.value/"buildinfo.properties"
val prop = new java.util.Properties
def readProp: Int = {
prop.load(new java.io.FileInputStream(file))
prop.getProperty("buildnumber", "0").toInt
}
def writeProp(value: Int) {
prop.setProperty("buildnumber", value.toString)
prop.store(new java.io.FileOutputStream(file), null)
}
val current = if (file.exists) readProp
else 0
writeProp(current + 1)
current
}
buildInfoKeys += BuildInfoKey(execTask)
version <<= (version) { (v) =>
if (new File("buildinfo.properties").exists()) {
val config = ConfigFactory.parseFile(new File("buildinfo.properties")).resolve()
lazy val buildnumber = config.getString("buildnumber")
val buildversion=buildnumber.toInt/3
v.replace(".0-SNAPSHOT","."+ buildversion)
} else {
v.replace(".0-SNAPSHOT", "."+ "0")
}
}
resolvers += "Jasper OLAP" at "http://jaspersoft.artifactoryonline.com/jaspersoft/jaspersoft-repo/"
//Specs2 was included for 2.4 migration
resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases"
這裏是我的 「plugins.sbt」
// Comment to get more information during initialization
logLevel := Level.Warn
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/maven-releases/"
//jBcrypt repository
resolvers +="jBCrypt Repository" at "http://repo1.maven.org/maven2/org/"
//Modelmapper repository
resolvers +="modelmapper Repository" at "http://repo1.maven.org/maven2/org/"
resolvers += "jersey repository" at "http://http://repo.typesafe.com/typesafe/releases/com/sun/jersey/"
//AOP repository
resolvers +="aspectj Repository" at "http://repo1.maven.org/maven2/org/"
//Rabbit MQ dependency jars
resolvers +="amqp Repository" at "https://www.versioneye.com/java/org.springframework.amqp:spring-rabbit/1.4.5.RELEASE"
//google storage repository
//resolvers +="google storage Repository" at "http://repo1.maven.org/maven2/org/"
// Use the Play sbt plugin for Play projects
//addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.0")
addSbtPlugin("com.typesafe.play" % "sbt-fork-run-plugin" % "2.4.0")
resolvers += "Jasper OLAP" at "http://jaspersoft.artifactoryonline.com/jaspersoft/jaspersoft-repo/"
//resolvers += "Edulify Repository" at "https://edulify.github.io/modules/releases/"
resolvers += Resolver.url("Edulify Repository", url("http://edulify.github.io/modules/releases/"))(Resolver.ivyStylePatterns)
resolvers += "SBT Plugins" at "https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/"
// Use the Play2war plugin for Play projects
addSbtPlugin("com.github.play2war" % "play2-war-plugin" % "1.3-beta3")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.3.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-web" % "1.0.0")
// web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-uglify" % "1.0.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-gzip" % "1.0.0")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
//Ebean dependency for play 2.4
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0")
//Byte code enhancement for play 2.4
addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")
dependencyOverrides += "org.scala-sbt" % "sbt" % "0.13.5"
請發佈您的build.sbt和項目/ plugins.sbt – BatteryAcid
我已經添加了我的buid.sbt和plugins.sbt ...請建議我,如果有任何錯誤...提前致謝。 – sabari