maven-shade-plugin

Is maven shade-plugin culprit for my jar to not work in server

主宰稳场 提交于 2021-01-07 06:31:12
问题 I have developed a java application and made it a jar file. I bundled all the dependencies using mvn clean package maven-shaded-plugin. My problem is that although the application works fine in my local machine, it does not work in the server environment. Whenever I run it, I get a NullPointerException which means the variable is not being initialized, which implies the underlying dependency is not working properly. The original question I posted is in here: JMS connection not connecting to

Maven Shade Plugin causes duplicate jars on classpath when running integration tests

百般思念 提交于 2021-01-01 18:10:46
问题 I have a project which includes the S3 dependency from AWS's Java v2 SDK and builds a shaded jar. I am hitting this problem when running my integration tests from the terminal. The problem is that the interceptors are added twice because the classpath contains two jars with the S3 jar: once in my shaded jar and once from the local .m2 repository. Unfortunately I don't have any control of the code that contains this issue so I need to find a workaround until the issue is fixed. I have

Maven Shade Plugin causes duplicate jars on classpath when running integration tests

守給你的承諾、 提交于 2021-01-01 18:03:32
问题 I have a project which includes the S3 dependency from AWS's Java v2 SDK and builds a shaded jar. I am hitting this problem when running my integration tests from the terminal. The problem is that the interceptors are added twice because the classpath contains two jars with the S3 jar: once in my shaded jar and once from the local .m2 repository. Unfortunately I don't have any control of the code that contains this issue so I need to find a workaround until the issue is fixed. I have

Missing Abstract Class using Maven Shade Plugin for Relocating Classes

喜夏-厌秋 提交于 2020-08-10 19:34:12
问题 I am currently using Maven Shade plugin to relocate classes but it comes with the following issue: My project has a dependency on netty-all package: <dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>4.1.51.Final</version> </dependency> Due to a version conflict issue on this netty package, I need to relocate the classes within netty to avoid this conflict. I was trying to relocate classes from io.netty to com.shaded.io.netty using the plugin configurations

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

那年仲夏 提交于 2020-07-18 05:55:10
问题 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: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.1.0</version> <executions> <execution> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource

Invalid signature file digest for Manifest main attributes w/ Jetty and Maven Shade Plugin

半城伤御伤魂 提交于 2020-05-15 05:00:54
问题 I've seen a few other SO Q&As on this topic, but so far none of the solutions have worked for me: "Invalid signature file" when attempting to run a .jar Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes Valid JAR signature for JavaFX projects We're using Jetty for an open-source application, along with the Maven Shade Plugin: https://github.com/OneBusAway/onebusaway-gtfs-realtime-from-nextbus-cli We started getting the following

Run two versions of elasticsearch in java application using maven

左心房为你撑大大i 提交于 2020-03-25 17:56:51
问题 I have a legacy monolith application, which uses elasticsearch 1.X and now we need to run elasticsearch 7.X in the same application, so that same application index and query data in both version of elasticsearch. In my project, there are multiple modules and they all have their own POM and parent POM, and my new module which uses elasticsearch 7.X depends on some module which uses 1.X. Although I have excluded 1.X specific dependency in module which uses 7.X , Still it gives me below Error:

Maven shade plugin configuration not replacing the package

百般思念 提交于 2020-03-03 14:00:09
问题 Based on the requirement at Maven dependency incompatible library class, I have tried shade plugin as like below, but went in vain. <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <executions> <execution> <phase>compile</phase> <goals> <goal>shade</goal> </goals> <configuration> <filters> <filter> <artifact>com.lib:Encoder</artifact> <includes> <include>x/y/z/**</include> </includes> <excludes> <exclude>a/b/c/**</exclude> </excludes> </filter> </filters