maven-shade-plugin

Maven shade plugin warning: we have a duplicate - how to fix?

偶尔善良 提交于 2021-02-18 08:54:20
问题 This is my project POM (link to the paste, so you can right click > save as pom.xml) <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.zybnet</groupId> <artifactId>excel-reporter</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>mvn1</name> <url>http://maven

Use maven-flatten-plugin and maven-shade-plugin at the same time

夙愿已清 提交于 2021-02-08 14:15:52
问题 How to use the maven-flatten-plugin and maven-shade-plugin at the same time? I use revision , sha1 , changelist to manage the versions of a multi-module project. In order to deploy cosumable artifacts, I use maven-flatten-plugin to generate a flattened pom which make ${revision} to real value. But the maven-shade-plugin produces a reduced pom with ${revision} unchanged. How to specify the maven-shade-plugin to use the flattened pom to reduce the pom. 回答1: I experienced this same issue today

Use maven-flatten-plugin and maven-shade-plugin at the same time

别说谁变了你拦得住时间么 提交于 2021-02-08 14:14:38
问题 How to use the maven-flatten-plugin and maven-shade-plugin at the same time? I use revision , sha1 , changelist to manage the versions of a multi-module project. In order to deploy cosumable artifacts, I use maven-flatten-plugin to generate a flattened pom which make ${revision} to real value. But the maven-shade-plugin produces a reduced pom with ${revision} unchanged. How to specify the maven-shade-plugin to use the flattened pom to reduce the pom. 回答1: I experienced this same issue today

maven zip uber-jar and shell script

冷暖自知 提交于 2021-02-08 06:21:15
问题 I would like maven to combine an uber-jar created by the shade-plugin and a shell script from the all_files directory. The project structure looks like this: all_files/ mvn_script.sh projB-shaded.jar maven_project/ guide/ parent-pom.xml projA/ pom.xml projB/ pom.xml The jar is produced by projectB's pom file and then placed into the outtermost folder to be ready to be zipped with the shell script. The reason is so that the shell script can call the jar file to execute the project. I want

Spring Boot With Maven Shade Plugin - Controllers not mapped (404 Error)

半城伤御伤魂 提交于 2021-02-07 11:47:31
问题 For my Spring boot application with embedded tomcat, due to some limitation I need to do away with spring-boot-maven-plugin and need to use maven-shade-plugin . With maven package command I could successfully create the jar file. However, all my controllers stopped working and gives me 404 error. Also static content placed in my resources folder are not being served anymore. Always getting 404 error. my pom.xml <dependencyManagement> <dependencies> <dependency> <!-- Import dependency

Failsafe error: “Invalid signature file digest for Manifest main attributes” when using shade plugin

徘徊边缘 提交于 2021-01-29 01:35:56
问题 When using shade-plugin in maven and later trying to run integration tests using failsafe-plugin, I get the following error when failsafe is about to run, resulting in my integration tests being skipped: [ERROR] Invalid signature file digest for Manifest main attributes This error seems to be caused by signed jars in dependencies. This answer suggests using dependency plugin to filter out the signatures, but it did not seem to work for me. Shade-plugin just unpacked all the dependencies and

Failsafe error: “Invalid signature file digest for Manifest main attributes” when using shade plugin

房东的猫 提交于 2021-01-29 01:33:09
问题 When using shade-plugin in maven and later trying to run integration tests using failsafe-plugin, I get the following error when failsafe is about to run, resulting in my integration tests being skipped: [ERROR] Invalid signature file digest for Manifest main attributes This error seems to be caused by signed jars in dependencies. This answer suggests using dependency plugin to filter out the signatures, but it did not seem to work for me. Shade-plugin just unpacked all the dependencies and

Failsafe error: “Invalid signature file digest for Manifest main attributes” when using shade plugin

狂风中的少年 提交于 2021-01-29 01:32:53
问题 When using shade-plugin in maven and later trying to run integration tests using failsafe-plugin, I get the following error when failsafe is about to run, resulting in my integration tests being skipped: [ERROR] Invalid signature file digest for Manifest main attributes This error seems to be caused by signed jars in dependencies. This answer suggests using dependency plugin to filter out the signatures, but it did not seem to work for me. Shade-plugin just unpacked all the dependencies and

How to exclude test dependencies from a shaded maven jar?

删除回忆录丶 提交于 2021-01-22 06:34:27
问题 I'm using the maven-shade-plugin and I'd like to exclude not only my test code, but my test dependencies in the shaded jar. I realize I can specifically exclude certain artifacts (like junit), but that's a good bit of work and prone to some error most likely. I'm setting minimizeJar to true, but I still see my Junit and Mockito dependencies showing up. Is there just no way to exclude all test scoped dependencies via configuration? 回答1: Make sure your test dependencies in the test scope:

How to exclude test dependencies from a shaded maven jar?

蹲街弑〆低调 提交于 2021-01-22 06:33:24
问题 I'm using the maven-shade-plugin and I'd like to exclude not only my test code, but my test dependencies in the shaded jar. I realize I can specifically exclude certain artifacts (like junit), but that's a good bit of work and prone to some error most likely. I'm setting minimizeJar to true, but I still see my Junit and Mockito dependencies showing up. Is there just no way to exclude all test scoped dependencies via configuration? 回答1: Make sure your test dependencies in the test scope: