maven-shade-plugin

Rename files inside a jar using some maven plugin

被刻印的时光 ゝ 提交于 2020-01-14 19:51:31
问题 I have a jar build by maven-shade-plugin. It contains META-INF/services with several files. These files have wrong names (because of the bug https://issues.apache.org/jira/browse/MSHADE-182). I'd like to rename these files. What is the easiest way of doing this with maven? 回答1: Dirty hack, but it works for me <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>unpack</id> <phase>package</phase>

An API incompatibility was encountered while executing org.apache.maven.plugins:maven-shade-plugin:1.3.1:shade: java.lang.AbstractMethodError: null

有些话、适合烂在心里 提交于 2020-01-05 02:30:28
问题 While trying to build an old version of Apache CXF 2.2.2, I kept getting an error produced by an XmlAppendingTransformer used by the maven-shade-plugin : unable to connect to get the DTD for http://java.sun.com/dtd/properties.dtd (referenced by the file META-INF/cxf/extensions.xml ) I have tried to fix this problem by using the ignoreDtd option provided by maven-shade-plugin starting with version 1.3.1. But now I am getting another more weird error: [ERROR] Failed to execute goal org.apache

Include dependency in maven shade plugin

二次信任 提交于 2020-01-04 07:54:13
问题 I am trying to create a deploy-able jar which using Apache's commons-lang3. However my AWS cluster where my Hadoop is does not contain this library so I get a classNotFoundException. I figured I needed to manually add that dependency in but I am having issues working with the maven shade plugin (I was recommended to use this) My current pom file looks like this : <dependency> <groupId>org.apache.pig</groupId> <artifactId>pig</artifactId> <version>0.12.0-cdh5.2.6</version> </dependency>

Maven shade + resteasy Could find writer for content-type

帅比萌擦擦* 提交于 2019-12-31 04:01:07
问题 I have a project that works fine with maven managed dependencies. But I have a requirement for giving my jar files as one. For this I use maven-shade plugin (http://maven.apache.org/plugins/maven-shade-plugin/). All class files are exported correctly but when I try to run my application I get an error as: Could find writer for content-type multipart/form-data type: org.jboss.reasteasy.plugins.provider.multipart.MultipartFormDataOutput Any help would be great, thanks. Note: I had a similar

What is a shaded jar? And what is the difference/similarities between uber jar and shaded jar? [duplicate]

╄→尐↘猪︶ㄣ 提交于 2019-12-30 05:46:29
问题 This question already has answers here : What is an uber jar? (4 answers) Closed last year . Can you please help explain what is a shaded jar and how is the maven-shade-plugin useful? Also what is an uber jar. 回答1: I'll explain what an uber JAR is first because this underpins the shading explanation. Uber JAR An uber JAR is a JAR which contains the contents of multiple JARs (or, less commonly, multiple other JARs themselves) Your application will almost certainly use other packages and these

sbt publish (or publishLocal) VS sbt assembly for distribution purposes and dependency conflicts resolution

北慕城南 提交于 2019-12-24 18:29:14
问题 Bottom line is that I want to distribute a library that can be integrated using SBT or Maven and whose dependencies won't conflict with the integrating project's dependencies or transitive dependencies. Currently I am distributing my library through SBT using the publish command which is configured to publish the artifacts to my private JFrog Artifactory . It is working as expected in the sense that it will publish the library to artifactory and that I can easily integrate the resulting

SSHJ and the Maven shade plugin

纵饮孤独 提交于 2019-12-24 17:18:09
问题 Testing SSHJ in Eclipse and everything looks good. But When I use the Maven shade plugin to package SSHJ I get the following error: Exception in thread "main" net.schmizz.sshj.userauth.UserAuthException: Exhausted available authentication methods at net.schmizz.sshj.SSHClient.auth(SSHClient.java:217) at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:316) at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:365) at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:295) at

Maven shade unable to locate Spring NamespaceHandler for XML schema namespace

百般思念 提交于 2019-12-24 02:32:53
问题 I've a small Spring project, that I've booted up with roo 1.2.2 I can run the main class just fine within Eclipse Juno. However when I try to run the JAR file built with mvn package , I get the following error: Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx] Offending resource: class path resource [META-INF

ClassNotFound exception while using the Maven Shade Plugin

为君一笑 提交于 2019-12-23 18:21:56
问题 I am trying to follow this link: http://maven.apache.org/plugins/maven-shade-plugin/examples.html I am new to Maven. I feel a bit out of depth trying to follow the example. I am able to get Quartz Scheduler to get working with Spring. I want to be able to run it from commandline using jar file. Here are the list of classes and pom file I used. EDIT: I am able to get a shade jar file. I used mvn clean install but when I try to run it from the command line, I get the following errors. C:\Users

Superfluous warnings when using maven-shade-plugin

谁说我不能喝 提交于 2019-12-21 07:16:13
问题 I am using maven-shade-plugin for a simple maven project, the plugin successfully includes all the dependencies into a final "shaded" jar. The process works well every time and produces exactly what I need. When run the "first" time (after a clean ), the plugin is quiet and produces very little output. However, when re-run (without a clean from the last build), there are lots of warning messages such as this; [WARNING] We have a duplicate package/a/b/foo.class [WARNING] We have a duplicate