Modules were resolved with conflicting cross-version suffixes in {file:/D:/WorkSpace/sbtTest/}sbttest

2015-07-24 09:57:56   作者:MangoCool   来源:MangoCool

最近想要学习Spark SQL,什么也没想,直接开始动手,在官网抄了个简单的例子后。

直接打包,sbt命令:package,结果忧桑啊,报错了:

[error] Modules were resolved with conflicting cross-version suffixes in {file:/D:/WorkSpace/sbtTest/}sbttest:
[error]    org.spark-project.akka:akka-remote _2.10, _2.11
[error]    org.spark-project.akka:akka-slf4j _2.10, _2.11
[error]    org.json4s:json4s-ast _2.10, _2.11
[error]    org.spark-project.akka:akka-actor _2.10, _2.11
[error]    org.apache.spark:spark-network-shuffle _2.10, _2.11
[error]    com.twitter:chill _2.10, _2.11
[error]    org.json4s:json4s-jackson _2.10, _2.11
[error]    com.fasterxml.jackson.module:jackson-module-scala _2.10, _2.11
[error]    org.json4s:json4s-core _2.10, _2.11
[error]    org.apache.spark:spark-core _2.10, _2.11
[error]    org.apache.spark:spark-network-common _2.10, _2.11
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[error] (*:update) Conflicting cross-version suffixes in: org.spark-project.akka:akka-remote, org.spark-project.akka:akka-slf4j, org.json4s:json4s-ast, org.spark-project.akka:akka-actor, org.apache.spark:spark-network-shuffle, com.twitter:chill, org.json4s:json4s-jackson, com.fasterxml.jackson.module:jackson-module-scala, org.json4s:json4s-core, org.apache.spark:spark-core, org.apache.spark:spark-network-common
[error] Total time: 14 s, completed 2015-7-24 9:34:16
从字面上来理解,应该是模块之间有冲突,应该是指的依赖之间的冲突,于是我想到了我所添加的依赖:
"org.apache.spark" % "spark-sql_2.10" % "1.3.1",
"org.apache.spark" % "spark-core_2.11" % "1.3.1"
一看,明白了,应该是spark-core_2.11和spark-sql_2.10的artifactId后缀不一致引起的,于是从maven仓库查到spark-core依赖包也有artifactId是spark-core_2.10的,直接更改依赖的artifactId。

刷新sbt工程,再执行sbt打包命令package。

至此问题解决!

maven仓库地址:http://mvnrepository.com/

标签: SBT package spark exception Scala

分享:

关于我

一个喜欢唱歌,热衷旅行,爱好电子产品的码农。没事,跟三五好友吼上几嗓子,约上几个背着行囊去露营或者宅在家里抱着孩子敲代码。

座右铭:当你的才华还撑不起你的野心的时候,你就应该静下心来学习,永不止步!

            人生之旅历途甚长,所争决不在一年半月,万不可因此着急失望,招精神之萎葸。


Copyright 芒果酷(mangocool.com) All rights reserved. 湘ICP备14019394号

免责声明:本网站部分文章转载其他媒体,意在为公众提供免费服务。如有信息侵犯了您的权益,可与本网站联系,本网站将尽快予以撤除。