Advertisement
Guest User

Untitled

a guest
Feb 14th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 1.94 KB | None | 0 0
  1.     excludedJars in assembly <<= (fullClasspath in assembly) map { cp =>
  2.       val excludes = Set(      
  3.         "junit-4.5.jar", // We shouldn't need JUnit
  4.         "jsp-api-2.1-6.1.14.jar",      
  5.         "jsp-2.1-6.1.14.jar",
  6.         "jasper-compiler-5.5.12.jar",  
  7.         "minlog-1.2.jar", // Otherwise causes conflicts with Kyro (which bundles it)
  8.         "janino-2.5.16.jar", // Janino includes a broken signature, and is not needed anyway
  9.         "commons-beanutils-core-1.8.0.jar", // Clash with each other and with commons-collections
  10.         "commons-beanutils-1.7.0.jar",      // "
  11.         "hadoop-tools-0.20.2.jar",      
  12.         "guava-14.0.1.jar", // conflict spark-network-common_2.10-1.3.0.jar
  13.         "jcl-over-slf4j-1.7.10.jar", //conflict commons-logging-1.1.3.jar
  14.         "hadoop-yarn-api-2.2.0.jar",    
  15.         "bigtable-protos-0.3.0.jar", //conflict grpc-core-proto-0.0.3.jar
  16.         "datastore-v1-protos-1.0.1.jar" //conflict grpc-core-proto-0.0.3.jar
  17.         "appengine-api-1.0-sdk-1.9.34.jar",
  18.         "guava-jdk5-17.0.jar"  
  19.       )
  20.       cp filter { jar => excludes(jar.data.getName) }
  21.     },
  22.  
  23.     mergeStrategy in assembly <<= (mergeStrategy in assembly) {
  24.       (old) => {
  25.         case x if x.contains("UnusedStubClass.class") => MergeStrategy.first
  26.         case x if x.endsWith("project.clj") => MergeStrategy.discard // Leiningen build files
  27.         case x if x.startsWith("META-INF") => MergeStrategy.discard // More bumf
  28.         case x if x.endsWith(".html") => MergeStrategy.discard
  29.  
  30.         case x if x.startsWith("com/google/cloud/bigtable/") => MergeStrategy.last
  31.         case x if x.startsWith("com/google/longrunning/") => MergeStrategy.last
  32.         case x if x.startsWith("com/google/rpc/") => MergeStrategy.last
  33.         case x if x.startsWith("com/google/type/") => MergeStrategy.last
  34.         case x if x.startsWith("google/protobuf/") => MergeStrategy.last
  35.        
  36.         case x => old(x)
  37.       }
  38.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement