Questions tagged [maven-shade-plugin]

This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename or remove - the packages of some of the dependencies.

Sources : http://maven.apache.org/plugins/maven-shade-plugin/index.html

Goals Overview

The Shade Plugin has a single goal:

shade:shade is bound to the package phase and is used to create a shaded jar.

Usage

General instructions on how to use the Shade Plugin can be found on the usage page. Some more specific use cases are described in the examples given below. Last but not least, users occasionally contribute additional examples, tips or errata to the plugin's wiki page.

In case you still have questions regarding the plugin's usage, please feel free to contact the user mailing list. The posts to the mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the mail archive.

If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our issue tracker. When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. Of course, patches are welcome, too. Contributors can check out the project from our source repository and will find supplementary information in the guide to helping with Maven.

Official site : http://maven.apache.org/plugins/maven-shade-plugin/

Maven Repository site : https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-shade-plugin

529 questions
2
votes
1 answer

Maven shade plugin to include all dependency jars

I am facing an issue while packaging jar using maven in eclipse. I believe its taking only the dependency classes that are required during compile time.. There are classes that are required at the run time and its not including it. Is there a way to…
user3072054
  • 339
  • 2
  • 6
  • 17
2
votes
0 answers

how to resolve NoSuchFieldError in jive through Maven Shade Plugin Relocation

Somewhere in the code from jive 6 uses httpcore-4.0.1.jar. However, in my plugin, httpcore-4.3.2.jar is used. Due to this jar conflict, I saw NoSuchFieldError when running jive's cargo-start. After investigating, I found a nice link about Maven…
bvmanager
  • 21
  • 3
2
votes
1 answer

Maven Shade Plugin: Cannot create instance of

I am trying to use Maven Shade the first time and got stuck. I get an error messages which says: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:2.3: shade for parameter outputFile: Cannot create…
toobee
  • 2,592
  • 4
  • 26
  • 35
2
votes
1 answer

How to tell the maven-shade-plugin to preserve signatures?

I am using the maven-shade-plugin to combine two seperate jars into a single combined jar. One of the jars is signed, while the other is not. If I use the default configuration of the plugin, it will build a broken jar as the new manifest is missing…
michas
  • 25,361
  • 15
  • 76
  • 121
2
votes
0 answers

maven-shade-plugin does not include dependencies of other modules in uber jar

Summary of my issue: in a multi-module project, one of the module has a dependency to another module. When building an uber jar of this module with the maven-shade-plugin, all its dependencies are correctly included, but not the dependencies of the…
FBB
  • 1,414
  • 2
  • 17
  • 29
2
votes
2 answers

Including a synthetic file as javadoc artifact in a Maven build

I am building a multimodule project with Maven where one module represents the shaded version of the other module: parent |- base |- base-shaded The base module contains all my source files but with dependencies I want to import into my own…
Rafael Winterhalter
  • 42,759
  • 13
  • 108
  • 192
2
votes
2 answers

maven-shade-plugin and licenses

I'm creating a minimized jar using the maven-shade-plugin and have quite a lot of dependencies included that are external, ie. having all sorts of open licenses. How do I preserve those licenses in a convenient and appropriate manner? Is there any…
user1050755
  • 11,218
  • 4
  • 45
  • 56
2
votes
1 answer

Maven shade - repackage dependecy jar with custom configuration

I have a common service which is packaged as a jar with all it's dependencies. Consumer1, consumer2, consumer3 provides different configuration for Common_service. What is the best way to repackage common_service with all it's jar content and in…
Sairam Krish
  • 10,158
  • 3
  • 55
  • 67
2
votes
0 answers

Debugging JNI-Based LinkageErrors in LibGDX

How can I debug further into the root cause of a version mismatch with natives? I'm fiddling with LibGDX applets and creating a shaded uber-jar to get around all the signing nonsense (I strip out all the existing certificates, and then sign my own…
DeejUK
  • 12,891
  • 19
  • 89
  • 169
2
votes
1 answer

Use relocated dependencies in child projects

Heyho, I'm currently developing a bukkit plugin and I want to use guava. Bukkit still uses Guava 11.0, but I want to use 14.0. So I tried to relocate guava in my main module. This worked perfectly. An other module on the same level uses guava too…
maxammann
  • 1,018
  • 3
  • 11
  • 17
2
votes
1 answer

maven-release-plugin does not include shaded artifacts

I am trying to release a multi module project with shaded artifacts. When I run the release:prepare then release:perform the artifacts uploaded to the Nexus repository include only the original jar and not the shaded one. Is it possible that the…
Eyal Azran
  • 379
  • 1
  • 3
  • 14
2
votes
2 answers

Exclude jar-with-dependencies from deploying to Nexus

I'm using maven-shade-plugin to create an additional jar with all my dependencies. The shade phase is linked to the package phase, so my jar-with-dependencies is created everytime I do a mvn package. However, I do not want this jar-with-dependencies…
sam33r
  • 25
  • 6
2
votes
0 answers

Using maven-shade-plugin, how can one use dependencyReducedPom?

I'm working on an open-source project (neo4j-connector) which make intensive use of maven-shade-plugin to include in packaged RAR the neo4j application without referencing multiple jars (seems like a limitation of maven-rar-plugin). Anyway, when…
Riduidel
  • 22,052
  • 14
  • 85
  • 185
2
votes
1 answer

maven package JDO dependencies with shade jar

I am trying to package a shade jar which consists of my code + dependencies. I am able to package everything fine but since I am using DataNucleus (datanucleus-core, datanucleus-api-jdo, datanucleus-rdbms) they have their plugin.xml in their root…
str1k3r
  • 41
  • 2
2
votes
2 answers

Spring, Hibernate checks every jar in my Maven Shade JAR

Getting like thoudsands of these line, when running my jar from java -jar foo.jar, so the application takes atleast 1 minute to boot up. 2012-10-04 09:31:56,543 [AWT-EventQueue-0] DEBUG org.hibernate.ejb.packaging.AbstractJarVisitor - Filtering:…
Jaanus
  • 16,161
  • 49
  • 147
  • 202