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

maven structure issue based on unpacking signed jars

I am working on standalone application using maven. I have tried following scenarios, 1. Using maven shade plugin it unpacking all the dependencies so my signed jars(bcprov-jdk16-1.46.jar) are unpacked. so lost the jar's sign because of this…
0
votes
1 answer

Remote connect using SSHJ in a Maven shade jar

I have used SSHJ to connect to a remote machine and that works fine when doing it from IntelliJIDEA. However when I try to build an "uberjar" using maven-shade-plugin I get the stacktrace shown below. I do have org.bouncycastle.bcprov-jdk16 in the…
keyoxy
  • 4,423
  • 2
  • 21
  • 18
0
votes
2 answers

Can I specify a JPA compliant persistence.xml file on the java command line?

I've got an UberJar with all my java classes, but want to execute this jar with an external persistence.xml file. Per the specification, Hibernate (or any other JPA provider) looks for the persistence.xml file in any META-INF folder that's on the…
Steve Moyer
  • 5,663
  • 1
  • 24
  • 34
0
votes
1 answer

maven-jarsigner-plugin fails during Jenkins build but not on command line

Following environment given: Windows Server 2012 Java 1.6 Maven project with configured (assembly or shade plugin) AND jarsigner:sign/verify plugin Jenkins 1.518 running within Tomcat 7 (which runs with Java 1.7) Tomcat running as Windows Service…
0
votes
1 answer

Maven Shade Plugin for Java 7 UberJar

My question is simple: is there a version of the Maven-shade-plugin that is compatible with Java version 7? Specifically, when I attempt to use this plugin I get the following error (using Netbeans IDE): diamond operator is not supported in -source…
derigible
  • 964
  • 5
  • 15
  • 32
0
votes
1 answer

Maven Shade Plugin filtering

I am trying to enhance/filtering some of my resources at included jars. What I would like to is replacing some of my keywords at included jars at shading phase by new ones. Is there a way to enhance shaded resources? Edit: My resources have such…
Cemo
  • 5,370
  • 10
  • 50
  • 82
0
votes
1 answer

Maven shade plugin and Spring resource import: unreferenced beans

I would build a Spring - Jnlp project with Maven shade plugin in order to output only one jar file. The project has one dependency referring to a secondary Spring project. The resulting jar structure shows correctly all the specified dependencies…
ruphus
  • 163
  • 1
  • 13
0
votes
1 answer

Result of program using pdfbox built with maven-shade-plugin is different than normal NetBeans Run

I have program in java which uses PDFBox 1.7.1 and it is build with maven-shade-plugin 2.0. Here is the code which uses PDFBox api: public class PdfFile { protected PDDocument document = null; public boolean load(byte[] bytes) throws…
user606521
  • 14,486
  • 30
  • 113
  • 204
0
votes
0 answers

Maven packages in the a different version than dependency:tree shows

I have a dependency structure similar to this: A:compile com.jolbox:bonecp:jar:0.7.1.RELEASE:compile com.google.guava:guava:jar:r06:compile com.google.guava:guava:jar:13.0:compile That is, my project depends on A, which depends on…
ajduff574
  • 2,101
  • 1
  • 21
  • 20
0
votes
1 answer

Trouble building executable uber jar with Maven and Subetha SMTP and LOG4J

I'm new to maven, and trying to create an application which uses the [Subetha SMTP library][1], and package the entire app into one executable app. To do the packaging I am attempting to use [Mavens Shade plugin][2], but am running into an issue…
xceph
  • 1,036
  • 2
  • 13
  • 28
-1
votes
0 answers

maven shade plugin. original still available in Intellij Idea run configuration

I have single module pom.xml. There is third party dependency "library.jar" and contains classes "org.slf4.*" stuff. I can shade it (exclude) to "library-shaded.jar" and use later after package but: During development in Intellij Idea (run…
-1
votes
1 answer

What exactly maven does when a transitive dependency is excluded?

Impact of exclusion in the context of jar packaging(simple/fat jar using shade plugin). What i mean here, how can it be verified by extracting the jar.
Madhav Kumar Jha
  • 353
  • 1
  • 2
  • 13
-1
votes
2 answers

How to make an executable jar made with maven shade use an external properties file

For a project, I created an executable jar using the maven shade plugin. So far it runs, as it should, double clicking it starts the application just like executing the main method in my IDE. My next task is to have a properties file (named…
-1
votes
1 answer

Need help packaging a webservice client jar in Java

We have a series of web service APIs that we have also written clients for so that we can easily re-use them in other Java applications. I now have need to be able to use the clients in an environment outside of a webserver. I used the…
SteveS
  • 1,008
  • 3
  • 18
  • 32
-1
votes
1 answer

Using Eclipse to edit post-merge META-INF files merged by Maven shade plugin

I'm working on a project called vertx-bigapp-skeleton to make the Vert.x deployment easier. For that, I decided to create a file called META-INF/vertx.verticle in the verticles (Maven submodules of the example project). If I compile and run the…
Marcel
  • 377
  • 5
  • 16
1 2 3
35
36