2016-01-29 54 views
0

我嘗試將播放版本從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" 
+0

請發佈您的build.sbt和項目/ plugins.sbt – BatteryAcid

+0

我已經添加了我的buid.sbt和plugins.sbt ...請建議我,如果有任何錯誤...提前致謝。 – sabari

回答

0

你需要使用更新版本的郵件2.4播放。只需將此行添加到您的build.sbt(而不是您當前的導入): "com.typesafe.play" %% "play-mailer" % "3.0.1" 還注意到名稱是play-mailer,並且不需要播放插件。 這裏是link

+0

感謝您的回覆vizog ..我已經更改了build.sbt和application.conf中的郵件程序導入。但是仍然出現錯誤「sbt.IncompatiblePluginsException:檢測到插件中的二進制不兼容性。」 – sabari

+0

我注意到你有一個依賴覆蓋sbt在你的plugins.sb中:'dependencyOverrides + =「org.scala-sbt」%「sbt」%「0.13.5」'那是什麼?並且我沒有看到啓用播放插件:'addSbtPlugin(「com.typesafe.play」%「sbt-plugin」%「2.4.6」)'我正在使用2.4.6兼容2.4.0的遊戲,有很多錯誤修復。爲什麼不使用它?也使用sbt-web插件版本1.0.2。讓我知道如果這可以解決您的問題 – vizog

+0

我已經啓用插件播放爲:「addSbtPlugin(」com.typesafe.play「%」sbt-plugin「%」2.4.0「)」,在上面的代碼中它被錯誤地評論。請給我發送plugins.sbt和build.sbt這是在你的PLAY 2.4項目中使用..並且很抱歉在延遲vizog中回覆..提前感謝。 – sabari

相關問題