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

Merge .properties files with Apache shades plugin

I'm trying to merge openwebbeans.properties files which are appeared in 2 of the dependencies(openwebbeans-impl, openejb-core) in one of my OSGi bundle using the shades plugin. I follow the shades doc on My configuration is as follows…
0
votes
1 answer

How to add external jar library with Maven, with the possibility of following full(with external jar inside) packaging?

I use Maven and have external library(soot). I want to add this library to my project with Maven, and then package into 1 uber jar. 1)To add library, i can use local repo(example). 2)To get a jar with dependencies, i can use shade-plugin or…
watson94
  • 63
  • 1
  • 1
  • 5
0
votes
1 answer

Connecting to db2 from java client

I am trying to connect to db2 from a java client running the application as a jar. The jar is a super-jar with all dependencies generated by the shade plugin. When I run the program from my ide(Netbeans) it runs fine, but when I run it from…
Runar Halse
  • 3,528
  • 10
  • 39
  • 59
0
votes
3 answers

Run map reduce job with 3rd party dependency in Jar

I am trying to test if I can jar 3rd party dependencies into my jar, SSH the jar over to a remote machine, and then run a map reduce job. Process: With my project, I run mvn clean package and that produces the files my-appy-1.0-SNAPSHOT.jar and…
Liondancer
  • 15,721
  • 51
  • 149
  • 255
0
votes
1 answer

$Class.getResource failed from fat jar packed by maven shade plugin

My java/scala program requires support from a javescript code snippet. So I put it in my resource folder: resources |- sizzle.js And in my pom.xml to explicitly include it in the fat/uber jar compiled by maven shade plugin: …
tribbloid
  • 4,026
  • 14
  • 64
  • 103
0
votes
1 answer

Why maven does not include dependencies in resulting jar

I am trying to build an uber jar with maven-shade-plugin 2.1. I expect it to include all the classes in my jar and dependency jars. But I see that it does not include classes from dependency jars. What could I be doing wrong? Following is my usage…
Girish
  • 1
  • 1
  • 3
0
votes
1 answer

let shade plugin ignore a war file but copy it into uberjar

I want to bundle hawt.io into my Java application (hawtio-default-1.4.45.war). To make it user friendly i just copied the war into resources. The problem is, I use shade plugin to create the jar and it seems that it fiddles around with the embedded…
dermoritz
  • 12,519
  • 25
  • 97
  • 185
0
votes
1 answer

Shade Plugin Harcording Dependency For Excluded Artifact also

I have the following shade plugin config : org.apache.maven.plugins maven-shade-plugin 2.2
Suraj Menon
  • 1,486
  • 3
  • 28
  • 50
0
votes
1 answer

How can the archive created by maven-shade-plugin be indexed?

I would have expected maven-shade-plugin to support: true but it does not seem to. Is there another way to get the shaded jar indexed?
Mike Hanafey
  • 5,565
  • 4
  • 20
  • 26
0
votes
1 answer

Create jar with dependencies and excluding specific source files

I would like to use Maven to create a jar that includes a specific dependent artifact and excludes some of the source java files. Currently I use this snippet: org.apache.maven.plugins
opeled
  • 153
  • 1
  • 4
  • 12
0
votes
0 answers

Change an existing class using maven shade

What I want to do is to change two existing classes in a project (project A). These classes are of type .class. I want to use maven shade in another project (project B) to point out these classes in project A, do some modification to them, and send…
agiledevpro
  • 133
  • 1
  • 5
  • 17
0
votes
3 answers

Unable to locate Spring NamespaceHandler for XML schema namespace springframework context

i am trying to build a single executable jar file with dependencies using maven shade plug in. in my pom.xml, i have added a dependency on a package which i have locally complied (mvn install) which is also a springframework based package. but i am…
user3590506
  • 171
  • 1
  • 4
  • 16
0
votes
1 answer

Running mvn shade on a pre-existing uber jar

I have a uber jar that's already generated (not via Maven; I just have the jar). I need to use it along with another jar, which has dependency conflicts. I'd like to shade all the libs in the first uber jar, except for a few classes which need to…
SRobertJames
  • 8,210
  • 14
  • 60
  • 107
0
votes
1 answer

How to configure Maven for a single codebase but multiple artifacts

I have a single very large codebase that compiles down to a JAR. I also use the shade plugin to compile it down and package it up with all dependencies. I also use the war plugin to get a WAR file. With respect to the WAR file, once the goal is…
0
votes
0 answers

Spring with maven-shade-plugin

I am trying to use to versions of spring in the same application: the first one is a webapp with spring 2.6 and the second it a jar client, with spring 4.0.2. The client communicates with another application and will be a dependency for the webapp.…
Cosmin Vasii
  • 1,429
  • 3
  • 14
  • 18