shade protobuf to resolve confilct with spark lib
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/33c6fd81 Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/33c6fd81 Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/33c6fd81 Branch: refs/heads/master Commit: 33c6fd81b5783079319651c7dd8d048913a128fc Parents: b14b293 Author: Chul Kang <[email protected]> Authored: Mon Mar 26 19:38:04 2018 +0900 Committer: Chul Kang <[email protected]> Committed: Thu Mar 29 12:03:10 2018 +0900 ---------------------------------------------------------------------- s2jobs/build.sbt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/33c6fd81/s2jobs/build.sbt ---------------------------------------------------------------------- diff --git a/s2jobs/build.sbt b/s2jobs/build.sbt index 02ed48d..e966fa6 100644 --- a/s2jobs/build.sbt +++ b/s2jobs/build.sbt @@ -42,16 +42,20 @@ libraryDependencies ++= Seq( crossScalaVersions := Seq("2.10.6") -mergeStrategy in assembly := { +assemblyMergeStrategy in assembly := { case PathList("META-INF", ps @ _*) => MergeStrategy.discard case _ => MergeStrategy.first } -excludedJars in assembly := { +assemblyExcludedJars in assembly := { val cp = (fullClasspath in assembly).value cp filter {_.data.getName == "guava-16.0.1.jar"} } +assemblyShadeRules in assembly := Seq( + ShadeRule.rename("com.google.protobuf.**" -> "org.apache.s2graph.shade.google.protobuf.@1").inAll +) + test in assembly := {} parallelExecution in Test := false
