1. 程式人生 > >關於spark和scala版本衝突問題

關於spark和scala版本衝突問題

在pom.xml 中進行配置相應版本的配置,例如spark1.6.2 相容scala2.10.5
下面,我提供一個相容的pom.xml檔案,我以上傳pom.xml檔案

4.0.0
com.aura.bigdata
meituan-log-analysis
1.0-SNAPSHOT
2008

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<scala.version>2.10.5</scala.version>
<spark.version>1.6.2</spark.version>
<jackson.version>2.4.3</jackson.version>
<hadoop.version>2.6.4</hadoop.version>

scala-tools.org Scala-Tools Maven2 Repository http://scala-tools.org/repo-releases scala-tools.org Scala-Tools Maven2 Repository http://scala-tools.org/repo-releases junit junit 4.12 test org.scala-lang scala-library ${scala.version} org.specs specs 1.2.5 test org.apache.spark spark-core_2.10 ${spark.version} org.apache.spark spark-sql_2.10 ${spark.version} org.apache.spark spark-hive_2.10 ${spark.version} org.apache.spark spark-streaming_2.10 ${spark.version} org.apache.hadoop hadoop-client ${hadoop.version} org.apache.spark spark-streaming-kafka_2.10 ${spark.version} mysql mysql-connector-java 5.1.39 org.json json 20090211 com.fasterxml.jackson.core jackson-core ${jackson.version} com.fasterxml.jackson.core jackson-databind ${jackson.version} com.fasterxml.jackson.core jackson-annotations ${jackson.version} com.alibaba fastjson 1.1.41 fastutil fastutil 5.0.9 commons-dbcp commons-dbcp 1.4 commons-dbutils commons-dbutils 1.6 org.projectlombok lombok 1.16.10 org.scala-tools maven-scala-plugin 2.15.0 compile testCompile ${scala.version} -target:jvm-1.5 org.apache.maven.plugins maven-eclipse-plugin true ch.epfl.lamp.sdt.core.scalabuilder ch.epfl.lamp.sdt.core.scalanature org.eclipse.jdt.launching.JRE_CONTAINER ch.epfl.lamp.sdt.launching.SCALA_CONTAINER maven-assembly-plugin jar-with-dependencies make-assembly package single org.apache.maven.plugins maven-compiler-plugin 1.8 1.8 org.codehaus.mojo build-helper-maven-plugin 1.10 add-source generate-sources add-source src/main/java src/main/scala