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
0
votes
1 answer

How to use maven-shade and felix to generate a shaded jar with a new manifest

I'm currently working on a project that is attempting to integrate use both shade and felix. The goal is to create a shaded jar that contains only the code we need, then use felix to create the manifest we need. The build part of my pom is as…
Neal
  • 127
  • 1
  • 2
  • 9
0
votes
2 answers

combination of shade, proguard and appassembler maven plugins

I'm trying to build and obfuscate a multi module project using maven. I use the shade plugin to create a fat jar containing all of my own class files(every module) so that I could obfuscate the fat jar using proguard-maven-plugin and then create…
raven
  • 775
  • 6
  • 22
0
votes
1 answer

How can Maven Shade Plugin relocate multiple versions of a transitive dependency?

I have two dependencies, artifact-a and artifact-b. Each depends on a different version of artifact-c. How can I shade artifacts to use these different dependencies? (Or else to have artifact-a use a shaded dependency and artifact-b use the normal…
0
votes
1 answer

Java Instant is not getting serialized as milliseconds using Jackson

I am using Jackson dependencies for serializing my request object which contains some Java Instant fields. Following are my Maven dependencies for Jackson
Shantanoo K
  • 765
  • 5
  • 15
  • 43
0
votes
0 answers

Maven dependencies error

I'm new with Maven and I'm stuck with dependencies. I'm trying to create my own executable jar with all its dependencies. I can achieve this in Eclipse exporting my project and obtaining a jar file with inside the necessary jars (I try to execute…
HCF
  • 23
  • 7
0
votes
0 answers

How to exclude parent webapp directory from child build

I have a parent maven module runtime and it contains webApp directory to store web related stuff.(html,js etc...).In my child module employee also follow the same structure.So when i am building the child project jar with dependencies it contains…
gihan-maduranga
  • 4,381
  • 5
  • 41
  • 74
0
votes
0 answers

Maven shade plugin not including custom dependencies

I want to compile all my .jars into a final .jar with Maven shade plugin. This works partially, but Maven is not including all the dependencies in the uberjar. (These questions didn't help me: here and here). From the output I can see that it is…
DA--
  • 723
  • 1
  • 8
  • 20
0
votes
1 answer

Unable to use WorldWind in Standalone Java Executable

I am trying to create a stand alone Java executable to display the WorldWind Globe and keep running into dependency issues. Below is my code: package com.mycompany.testmaven; import gov.nasa.worldwind.BasicModel; import…
0
votes
1 answer

Maven shade two executions with different log4j.properties

I have a module that creates two jars based on two shade executions. I want each of them to bundle different log4j.properties files in the jar. I have the following transformer each of the executions in my pom.xml:
lightlazer
  • 133
  • 1
  • 5
0
votes
1 answer

Shadow Jar doesn't include dependencies into fat jar

I am new to Gradle and to shadow jar (Gradle version of Maven's Shade plugin). I am building a fat jar, in which I want to merge service files (that's why I am using shadow jar in the first place). According to the documentation shadowJar task…
Ihor M.
  • 2,728
  • 3
  • 44
  • 70
0
votes
0 answers

Maven shade plugin picks up IDE jars?

I'm trying to use the Maven shade plugin (according to the tutorial here) to create a "fat jar" from my project. I'm working on my project in eclipse and when I look at the (huge) resulting fat jar, I see that it contains a lot (possibly all) of…
Guss
  • 30,470
  • 17
  • 104
  • 128
0
votes
1 answer

Creating uber jar with maven

My project inherits it's compile dependencies from parent and I have no control over it - can't change them to provided. Additionally, I have added another dependency 'a:b:1.0.0' to my project's pom. I want to include only 'a:b:1.0.0' with it's own…
Alexander.Furer
  • 1,817
  • 1
  • 16
  • 24
0
votes
0 answers

Unable to build avro from the trunk due to plexus XmlStreamWriter failure in shade-plugin

I am trying to build apache avro by cloning it from the trunk https://github.com/apache/avro.git but it is failing with the following error for me. cd lang/java/avro mvn clean install [INFO] --- maven-bundle-plugin:2.5.3:bundle (default-bundle) @…
user2250246
  • 3,807
  • 5
  • 43
  • 71
0
votes
3 answers

How do I embed artifact information in maven shaded jar

I would like to document in the shaded jar what maven artifacts actually end up in that shaded jar. All the packages get merged and that makes it difficult to workout exactly what artifacts went into it just by looking at the jar. I suppose the…
Phil
  • 377
  • 1
  • 2
  • 14