Hi all, I'm having issues with javax.servlet when running simple Spark jobs. I'm using Scala + sbt and found a solution for this error: problem is, this particular solution is not working when running tests. Any idea how can I exclude all conflicted dependencies for all scopes? Here is my partial build.sbt.
scalaVersion := "2.11.7" //Library repositories resolvers ++= Seq( Resolver.mavenLocal, "Scala-Tools Maven2 Repository" at "http://scala-tools.org/repo-releases", "Java.net repository" at "http://download.java.net/maven/2", "GeoTools" at "http://download.osgeo.org/webdav/geotools", "Apache" at "https://repository.apache.org/service/local/repositories/releases/content", "Cloudera" at "https://repository.cloudera.com/artifactory/cloudera-repos/", "OpenGeo Maven Repository" at "http://repo.opengeo.org", "Typesafe" at "https://repo.typesafe.com/typesafe/releases/", "Spray Repository" at "http://repo.spray.io" ) //Library versions val geotools_version = "13.2" val accumulo_version = "1.6.0-cdh5.1.4" val hadoop_version = "2.6.0-cdh5.4.7" val hadoop_client_version = "2.6.0-mr1-cdh5.4.7" val geowave_version = "0.9.0-SNAPSHOT" val akka_version = "2.4.0" val spray_version = "1.3.3" val spark_version = "1.5.2" /** **************************************** DEV ****************************************************/ //Library Dependencies for dev libraryDependencies ++= Seq( //Scala "org.scala-lang" % "scala-library-all" % scalaVersion.value, //GeoTools "org.geotools" % "gt-data" % geotools_version, "org.geotools" % "gt-geojson" % geotools_version, //Apache "org.apache.accumulo" % "accumulo-core" % accumulo_version, //Geowave "mil.nga.giat" % "geowave-core-store" % geowave_version, "mil.nga.giat" % "geowave-datastore-accumulo" % geowave_version, "mil.nga.giat" % "geowave-adapter-vector" % geowave_version, //Other "com.typesafe" % "config" % "1.3.0", //Spray - Akka "com.typesafe.akka" %% "akka-actor" % akka_version, "io.spray" %% "spray-can" % spray_version, "io.spray" %% "spray-routing" % spray_version, "com.typesafe.play" %% "play-json" % "2.5.0-M1" exclude("com.fasterxml.jackson.core", "jackson-databind"), //Spark "org.apache.spark" %% "spark-core" % spark_version, //Testing "org.scalatest" % "scalatest_2.11" % "2.2.4" % "test" ).map( _.excludeAll( ExclusionRule(organization = "javax.servlet") ) ) test in assembly := {} Thank you for your help, Moises