How to exclude jar in final sbt assembly plugin

John

I need to exclude spark and test dependencies from my final assembly jar. I tried to use provider but it was not working.

libraryDependencies ++= Seq("org.apache.spark" % "spark-core_2.11" % "2.0.1" % "provided")

and execute sbt assembly.

Please help me resolve this issue.

FaigB

Use exclude option of assembly plugin filtering by direct name or with contains

assemblyExcludedJars in assembly := {
    val cp = (fullClasspath in assembly).value
    cp filter { f =>
      f.data.getName.contains("spark-core") ||
      f.data.getName == "spark-core_2.11-2.0.1.jar"
    }
  }

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to exclude transitive dependency in Sbt ( in context of assembly plugin )?

From Java

How to exclude dependencies from maven assembly plugin : jar-with-dependencies?

From Dev

How to use maven assembly plugin to exclude a package from dependency jar?

From Dev

Sbt assembly plugin generates an empty jar

From Dev

How to exclude test dependencies with sbt-assembly

From Dev

How to force adding provided dependency to fat jar using sbt-assembly plugin?

From Dev

How to set final jar name with maven-assembly-plugin version 3

From Java

Spring Boot Maven Plugin: Exclude properties file from final jar

From Java

Can not set the final jar name with maven-assembly-plugin

From Java

How to setup build.sbt with sbt-assembly plugin?

From Dev

How to produce jar with sbt assembly without scala dependency

From Dev

Spark Standalone : how to avoid sbt assembly and uber-jar?

From Dev

How to include test dependencies in sbt-assembly jar?

From Dev

sbt assembly, including my jar

From Dev

How to exclude transitive dependencies with scope provided with maven-assembly-plugin?

From Dev

DeDuplication error with SBT assembly plugin

From Dev

SBT Plugin in an unmanaged jar file

From Java

How to include package.jar with maven-assembly-plugin

From Dev

How to configure a manifest file of a jar file by using the maven assembly plugin?

From Dev

Sbt Assembly Include Conf Files inside the JAR

From Dev

OutofMemoryErrory creating fat jar with sbt assembly

From Dev

sbt-assembly: Generate a minimal JAR file

From Dev

compile scala to assembly jar with SBT or gradle

From Dev

Find repository where sbt finds a plugin or JAR

From Dev

sbt plugin: add an unmanaged jar file

From Dev

Package jar from Nexus using Assembly plugin

From Java

Maven Assembly Plugin : Resources are copied at root of jar

From Dev

How to create executable jar in Kotlin using maven-assembly-plugin without a main class?

From Dev

How to add files from webapp directory to jar using Maven Assembly plugin?

Related Related

  1. 1

    How to exclude transitive dependency in Sbt ( in context of assembly plugin )?

  2. 2

    How to exclude dependencies from maven assembly plugin : jar-with-dependencies?

  3. 3

    How to use maven assembly plugin to exclude a package from dependency jar?

  4. 4

    Sbt assembly plugin generates an empty jar

  5. 5

    How to exclude test dependencies with sbt-assembly

  6. 6

    How to force adding provided dependency to fat jar using sbt-assembly plugin?

  7. 7

    How to set final jar name with maven-assembly-plugin version 3

  8. 8

    Spring Boot Maven Plugin: Exclude properties file from final jar

  9. 9

    Can not set the final jar name with maven-assembly-plugin

  10. 10

    How to setup build.sbt with sbt-assembly plugin?

  11. 11

    How to produce jar with sbt assembly without scala dependency

  12. 12

    Spark Standalone : how to avoid sbt assembly and uber-jar?

  13. 13

    How to include test dependencies in sbt-assembly jar?

  14. 14

    sbt assembly, including my jar

  15. 15

    How to exclude transitive dependencies with scope provided with maven-assembly-plugin?

  16. 16

    DeDuplication error with SBT assembly plugin

  17. 17

    SBT Plugin in an unmanaged jar file

  18. 18

    How to include package.jar with maven-assembly-plugin

  19. 19

    How to configure a manifest file of a jar file by using the maven assembly plugin?

  20. 20

    Sbt Assembly Include Conf Files inside the JAR

  21. 21

    OutofMemoryErrory creating fat jar with sbt assembly

  22. 22

    sbt-assembly: Generate a minimal JAR file

  23. 23

    compile scala to assembly jar with SBT or gradle

  24. 24

    Find repository where sbt finds a plugin or JAR

  25. 25

    sbt plugin: add an unmanaged jar file

  26. 26

    Package jar from Nexus using Assembly plugin

  27. 27

    Maven Assembly Plugin : Resources are copied at root of jar

  28. 28

    How to create executable jar in Kotlin using maven-assembly-plugin without a main class?

  29. 29

    How to add files from webapp directory to jar using Maven Assembly plugin?

HotTag

Archive