maven-shade-plugin

Log4j2 configuration not found when running standalone application built by shade plugin

本小妞迷上赌 提交于 2019-11-27 01:47:06
问题 I have application which when I run from maven log4j2 it is working: mvn exec:java -Dexec.args=... but when I run jar as standalone application then it shows error: java -jar log: ERROR StatusLogger Unrecognized format specifier [d] ERROR StatusLogger Unrecognized conversion specifier [d] starting at position 16 in conversion pattern. ERROR StatusLogger Unrecognized format specifier [thread] ERROR StatusLogger Unrecognized conversion specifier [thread] starting at position 25 in conversion

How to include test classes in Jar created by maven-shade-plugin?

大兔子大兔子 提交于 2019-11-27 01:15:47
问题 I'm trying to package my test classes in to an executable jar with dependencies using Maven, but I'm struggling to get this right. This is my pom.xml so far: <project> <modelVersion>4.0.0</modelVersion> <groupId>com.c0deattack</groupId> <artifactId>executable-tests</artifactId> <version>1.0</version> <packaging>jar</packaging> <name>executable-tests</name> <dependencies> <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-java</artifactId> <version>1.0.0</version> </dependency>

Maven shade jar throw exception

寵の児 提交于 2019-11-26 21:16:11
问题 I have the following Exception: Exception in thread "main" java.lang.SecurityException: no manifiest section for signature file entry javax/security/cert/CertificateException.class at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:380) at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:231) at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176) at java.util.jar.JarVerifier.processEntry(JarVerifier

Invalid or corrupt JAR File built by Maven shade plugin

徘徊边缘 提交于 2019-11-26 19:49:29
问题 After adding the Maven jFree dependency to my existing application, I'm not able to execute the created jar. The only error message I get is the following: java -jar target/com.company.product-1.0.0-SNAPSHOT.jar Error: Invalid or corrupt jarfile target/com. company.product-1.0.0-SNAPSHOT.jar The complete pom.xml looks like this: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=

Maven build [WARNING] we have a duplicate class

本秂侑毒 提交于 2019-11-26 18:28:25
问题 Anybody has any idea what happened to my maven build? I am getting a lot of duplicate warnings. [WARNING] We have a duplicate org/apache/commons/logging/impl/LogFactoryImpl$1.class in /home/shengjie/.m2/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar [WARNING] We have a duplicate org/apache/commons/logging/impl/LogFactoryImpl.class in /home/shengjie/.m2/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar [WARNING] We have a

What is the maven-shade-plugin used for, and why would you want to relocate Java packages?

倖福魔咒の 提交于 2019-11-26 11:57:10
I found the maven-shade-plugin being used in someone's pom.xml. I've never used maven-shade-plugin before (and I'm a Maven n00b) so I tried to understand the reason for using this and what it does. I looked at the Maven docs , however I can't understand this statement: "This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies." The documentation on the page doesn't seem very newbie-friendly. What is an "uber jar?" Why would someone want to make one? What's the point of renaming

How to create spring-based executable jar with maven?

纵饮孤独 提交于 2019-11-26 10:50:53
问题 I have a Maven based Spring-WS client project that I want to package as a single jar. In eclipse, everything runs properly. When I try to package it as an executable jar, I get ClassNotFound exceptions since the Spring jars are not included in my application jar. So I added the maven-shade-plugin to include all my dependencies in my application jar. When I look at my app jar, I see all the class files from all the dependencies included (all the library jar\'s are exploded). <build> <plugins>

What is the maven-shade-plugin used for, and why would you want to relocate Java packages?

二次信任 提交于 2019-11-26 02:39:20
问题 I found the maven-shade-plugin being used in someone\'s pom.xml. I\'ve never used maven-shade-plugin before (and I\'m a Maven n00b) so I tried to understand the reason for using this and what it does. I looked at the Maven docs, however I can\'t understand this statement: \"This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies.\" The documentation on the page doesn\'t seem