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
20
votes
2 answers

Is there a maven archtype for creating a console app?

Is it possible to generate a maven stub project via mvn archetype:generate that has a main function, and part of the build process includes making a App.cmd/App.sh to run the app from a shell? It seems that I need the maven-shade-plugin to create a…
Justin Dearing
  • 14,270
  • 22
  • 88
  • 161
20
votes
2 answers

How can I tell which signed jar is causing maven-shade-plugin to fail?

To run maven-shade-plugin, I have to use to method described here due to signed dependencies, as shown here: maven-shade-plugin package
jordanpg
  • 6,386
  • 4
  • 46
  • 70
19
votes
1 answer

How to set manifest class-path in maven shade plugin?

I'm using shade plugin and everything works fine except for being able to set Class-Path for manifest via
niken
  • 2,499
  • 3
  • 33
  • 56
18
votes
8 answers

Maven can't compile java 1.8

I'm trying to use maven to build a jar but I keep getting the error ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Application: Fatal error compiling: invalid target release:…
Brian
  • 4,328
  • 13
  • 58
  • 103
18
votes
6 answers

Geotools cannot find HSQL EPSG DB, throws error: NoSuchAuthorityCodeException

I am running Geotools inside of Apache Storm, and having a heck of a time with geotools dependency management. Every thing works when I run the storm cluster locally (windows 7 laptop), but when I deploy to the cluster I get this exception in my…
Mark Giaconia
  • 3,844
  • 5
  • 20
  • 42
18
votes
1 answer

Maven Shade Plugin to produce two Jars

Till now I was using maven assembly plugin to generate two JARs for each artifact - compiled sources and dependencies - the reason for this was simple - deploying only the compiled sources over network is significantly faster than deploying…
Vojtěch
  • 11,312
  • 31
  • 103
  • 173
17
votes
3 answers

Why does relocation with the maven shade plugin not work?

I am having some trouble running a Hadoop job that includes a newer version of Guava than the one that is included in the Hadoop distribution (CDH 5.2). This is a known problem. I try to solve it by shading the libraries using the Maven shade…
Robert
  • 872
  • 3
  • 10
  • 15
16
votes
5 answers

How can I configure the maven shade plugin to include test code in my jar?

I use the shade maven plugin to build my project so that all of its dependencies are included in one jar (this makes it easier to run it on Hadoop). Shade seems to exclude my test code by default, which is understandable. Since I would like to run…
Patrick Marchwiak
  • 1,072
  • 2
  • 11
  • 24
16
votes
2 answers

Error creating shaded jar: null: IllegalArgumentException

I'm using ASM 6.1 in my project to generate Class files dynamically. But I have a problem when assembling a fat jar. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.4.3:shade (default-cli) on project uetlx: Error…
Some Name
  • 8,555
  • 5
  • 27
  • 77
16
votes
3 answers

How do I bundle a JRE in my JAR, so that it can run on systems without Java?

I want to bundle a JRE inside my executable JAR, so that the exe can run on any system. I have tried Launch4j, but that approach requires me to ship both the JRE and the exe. As per my requirements, I should not use an installer to ship, nor…
amarnadh reddy
  • 161
  • 1
  • 1
  • 4
15
votes
1 answer

Superfluous warnings when using maven-shade-plugin

I am using maven-shade-plugin for a simple maven project, the plugin successfully includes all the dependencies into a final "shaded" jar. The process works well every time and produces exactly what I need. When run the "first" time (after a clean),…
xconspirisist
  • 1,451
  • 2
  • 13
  • 26
15
votes
3 answers

maven-shade-plugin - Cannot find 'resource' in class org.apache.maven.plugins.shade.resource.ManifestResourceTransformer

I copied configuration of maven shade plugin straight from apache maven documentation https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html This is my current set up:
Yakiv
  • 623
  • 2
  • 8
  • 19
15
votes
2 answers

Building a standalone executeable JAR with OpenEJB

I am building a CLI tool, which integrates with several EJB modules. For this reason, I need to build a fat jar, which is then executed as a standalone application. However, executing this fat jar with java -jar (Note: conf/openejb.xml is in the…
rzo1
  • 5,561
  • 3
  • 25
  • 64
15
votes
3 answers

Maven shade plugin does not exclude the manifest signature files

I am using the maven shade plugin to generate a consolidate jar for my project. The jar is generated as expected and when i try to use the jar and run it, i get a java.lang.SecurityException: Invalid signature file digest for Manifest main…
Var
  • 329
  • 5
  • 14
15
votes
2 answers

maven-shade like plugin for SBT

i'm rellatively new to the scala and sbt world and i'm trying to manage all my new projects with sbt rather than using maven. But now i'm on a point where I dont know further because I can't find any sbt counterpart for the mavnen-shade plugin. What…
shim_
  • 357
  • 5
  • 14
1
2
3
35 36