maven-shade-plugin

java Instant is NOT getting serialized as milliseconds using jackson

限于喜欢 提交于 2019-12-08 11:40:58
问题 I am using jackson dependencies for serializing my request object which contains some Java Instant fields. Following are my mavan dependencies for Jackson <!-- jackson dependecies --> <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-jsr310</artifactId> <version>2.8.5</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.8.5</version> </dependency> <dependency> <groupId>com

Spark with Pureconfig - proper maven shade plugin configuration

余生颓废 提交于 2019-12-08 08:07:53
问题 I have exactly the same problem as described here: Spark not working with pureconfig. The one and only answer to the question above seems reasonable, but I am working with Maven instead of sbt and I'm failing to translate the posted solution from sbt to Maven. I have tried something like the following: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade<

Exclude Classes from Being Included in Shaded Jar

本秂侑毒 提交于 2019-12-07 18:48:34
问题 I'm trying to exclude certain classes from being included in a shaded jar. I have tried several different configurations but for some reason the jars are still being included in my jar. Here is the plugin setup: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.2</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> <configuration> <filters> <filter> <artifact>*:*<

maven-shade-plugin error: Cannot find setter, adder nor field in org.apache.maven.plugins.shade.resource.ManifestResourceTransformer for 'resource'

跟風遠走 提交于 2019-12-07 13:49:24
问题 I was trying to run the Hello World example from Spring Boot. When I run 'mvn package' on the module I get the following error:- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.1:shade (default) on project spring.boot: Unable to parse configuration of mojo org.apache.maven.plugins:maven->shade->plugin:2.1:shade for parameter transformer: Cannot find setter, adder nor field in org.apache.maven.plugins.shade.resource.ManifestResourceTransformer for 'resource' ->

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

孤人 提交于 2019-12-07 04:27:49
问题 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 extract/install the JRE on the client machine. How do I put a JRE inside a JAR and make use of it? 回答1: You cannot put a JRE inside a JAR file. (Well you can ... but it won't help.) What you need to do is build and distribute an installer. The recommended

Spark with Pureconfig - proper maven shade plugin configuration

霸气de小男生 提交于 2019-12-06 16:07:16
I have exactly the same problem as described here: Spark not working with pureconfig . The one and only answer to the question above seems reasonable, but I am working with Maven instead of sbt and I'm failing to translate the posted solution from sbt to Maven. I have tried something like the following: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> <configuration> <createDependencyReducedPom>false<

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

£可爱£侵袭症+ 提交于 2019-12-06 08:53:35
when my use maven-shade-plugin package a execute jar, then Failed, and print error message: Cannot find 'resource' in class org.apache.maven.plugins.shade.resource.ManifestResourceTransformer follow is my config: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <manifestEntries> <Main-Class>cn.rongcapital.pa

Resolving transitive dependency conflicts in Java

放肆的年华 提交于 2019-12-06 02:13:38
问题 I am trying to build a Dropwizard (Jersey) REST endpoint that communicates with HBase. Although these are my only two top-level dependencies, both of these dependencies come loaded with many transitive dependencies that conflict. A simple example of such a conflict is Google's Guava: The HBase client specifies version 11 Dropwizard specifies 18 Dropwizard will not work with version 11 and HBase will not work with version 18. I have examined the Maven shade plugin documentation, but it does

How to stop maven-shade-plugin from blocking java.util.ServiceLoader initialization of opensaml-impl types

拈花ヽ惹草 提交于 2019-12-06 01:23:42
When using OpenSAML 3, you must first load components from the opensaml-saml-impl artifact with the following line of code: InitializationService.initialize(); This uses java.util.ServiceLoader to load any type which implements Initializer . When I write a test and run it with mvn integration-test , this works fine, and I can see that everything has loaded: Assert.assertTrue( XMLObjectProviderRegistrySupport .getUnmarshallerFactory() .getUnmarshallers() .size() > 400); However, my project uses maven-shade-plugin . The condition above is not true if I package the code into an uber-jar: mvn

Exclude META-INF/maven folder from the generated jar file

我只是一个虾纸丫 提交于 2019-12-05 22:31:01
问题 I am trying to create a jar file which has all the necessary classes extracted within the jar. But for few dependent jar like log4j, it creates some folders inside META-INF/maven/* . I have a limitation that the server in which I will be placing the generated jar file will not have Internet connectivity. So if there is any content in this META-INF/maven/* folder then it gives me an error. My maven descriptor looks like the following <build> <sourceDirectory>src</sourceDirectory> <plugins>