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

Jérôme Verstrynge :

Maven's assembly plugin enables the creation of a big jar including all dependencies with descriptorRef jar-with-dependencies.

How can one exclude some of these dependencies? It seems like it does not have such a configuration? Is there another solution?

Raghuram :

This example indicates one way to do this:

 <dependencySets>
    <dependencySet>
      ....
      <excludes>
        <exclude>commons-lang:commons-lang</exclude>
        <exclude>log4j:log4j</exclude>
      </excludes>
    </dependencySet>
    ....
  </dependencySets>

Essentially we would use the excludes option available in dependencySet.

See also: https://maven.apache.org/plugins/maven-assembly-plugin/assembly-component.html

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

maven-shade-plugin : exclude a dependency and all its transitive dependencies

From Java

Including dependencies in a jar with Maven

From Java

Maven build assembly with dependencies

From Java

Include Maven profile name in assembly-plugin built (with dependencies) jar

From Java

How can I visualize jar (not plugin) dependencies?

From Java

Maven assembly plugin not producing jar-with-dependencies any more, why?

From Java

How can I run code locally with dependencies and exclude them when creating a Jar with Maven

From

In an Android Gradle build, how to exclude dependencies from an included jar file?

From Java

Maven jar with dependencies?

From Dev

Maven dependency plugin copy jar with dependencies

From Dev

Using maven assembly plugin to create ZIP file containing a fat jar (jar-with-dependencies)

From Dev

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

From Dev

How to exclude jar in final sbt assembly plugin

From Dev

Downloading all plugin dependencies from a maven project

From Dev

Maven assembly put jar-with-dependencies into tar.gz package

From Dev

How to avoid maven shade plugin from including transitive dependencies from 'test-jar' types?

From Dev

Maven assembly plugin add dependencies

From Dev

Is the content of the Maven Assesmnly plugin's jar-with-dependencies descriptorRef documented as an example assembly descriptor file anywhere?

From Dev

Building jar with dependencies maven

From Dev

Maven assembly plugin: how to include provided dependencies of transitive dependencies

From Dev

maven exclude plugin from project dependencies by repository definition

From Dev

remove all dependencies of a jar within a maven assembly

From Dev

Maven: How to have jar-with-dependencies exclude "provided" dependencies?

From Dev

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

From Dev

Maven - How to exclude dependencies from generated JAR

From Dev

How to exclude test dependencies with sbt-assembly

From Dev

jar download with dependencies from maven

From Dev

Maven shade plugin - Jar and dependencies

From Dev

How to "exclude" dependencies embedded in an uber-jar using Maven 3?

Related Related

  1. 1

    maven-shade-plugin : exclude a dependency and all its transitive dependencies

  2. 2

    Including dependencies in a jar with Maven

  3. 3

    Maven build assembly with dependencies

  4. 4

    Include Maven profile name in assembly-plugin built (with dependencies) jar

  5. 5

    How can I visualize jar (not plugin) dependencies?

  6. 6

    Maven assembly plugin not producing jar-with-dependencies any more, why?

  7. 7

    How can I run code locally with dependencies and exclude them when creating a Jar with Maven

  8. 8

    In an Android Gradle build, how to exclude dependencies from an included jar file?

  9. 9

    Maven jar with dependencies?

  10. 10

    Maven dependency plugin copy jar with dependencies

  11. 11

    Using maven assembly plugin to create ZIP file containing a fat jar (jar-with-dependencies)

  12. 12

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

  13. 13

    How to exclude jar in final sbt assembly plugin

  14. 14

    Downloading all plugin dependencies from a maven project

  15. 15

    Maven assembly put jar-with-dependencies into tar.gz package

  16. 16

    How to avoid maven shade plugin from including transitive dependencies from 'test-jar' types?

  17. 17

    Maven assembly plugin add dependencies

  18. 18

    Is the content of the Maven Assesmnly plugin's jar-with-dependencies descriptorRef documented as an example assembly descriptor file anywhere?

  19. 19

    Building jar with dependencies maven

  20. 20

    Maven assembly plugin: how to include provided dependencies of transitive dependencies

  21. 21

    maven exclude plugin from project dependencies by repository definition

  22. 22

    remove all dependencies of a jar within a maven assembly

  23. 23

    Maven: How to have jar-with-dependencies exclude "provided" dependencies?

  24. 24

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

  25. 25

    Maven - How to exclude dependencies from generated JAR

  26. 26

    How to exclude test dependencies with sbt-assembly

  27. 27

    jar download with dependencies from maven

  28. 28

    Maven shade plugin - Jar and dependencies

  29. 29

    How to "exclude" dependencies embedded in an uber-jar using Maven 3?

HotTag

Archive