maven-shade-plugin

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

旧城冷巷雨未停 提交于 2019-12-05 21:32:44
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' -> [Help 1] I haven't used any 'resource' attribute, but it seems to complain about this. Any idea what I am

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

﹥>﹥吖頭↗ 提交于 2019-12-05 08:27:41
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? 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 way to create an installer is to use a commercial or open-source installer generator. (Google will help

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

百般思念 提交于 2019-12-04 03:50:33
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> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>1

Superfluous warnings when using maven-shade-plugin

怎甘沉沦 提交于 2019-12-04 00:18:06
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 package/c/d/bar.class This are warning messages only and the final artifact works fine. My question is

How can I tell which signed jar is causing maven-shade-plugin to fail?

半城伤御伤魂 提交于 2019-12-04 00:16:12
To run maven-shade-plugin, I have to use to method described here due to signed dependencies, as shown here: <plugin> <artifactId>maven-shade-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals><goal>shade</goal></goals> <configuration> <filters> <filter> <!-- filter out signature files from signed dependencies, else repackaging fails with security ex --> <artifact>*:*</artifact> <excludes> <exclude>META-INF/*.SF</exclude> <exclude>META-INF/*.DSA</exclude> <exclude>META-INF/*.RSA</exclude> </excludes> </filter> </filters> </configuration> </execution> </executions> <

maven-shade like plugin for SBT

ⅰ亾dé卋堺 提交于 2019-12-04 00:06:09
问题 i'm rellatively new to the scala and sbt world and i'm trying to manage all my new projects with sbt rather than using maven. But now i'm on a point where I dont know further because I can't find any sbt counterpart for the mavnen-shade plugin. What I found only were plugins to include all dependencies, but that is not what I need. So do somebody know a plugin to include certain dependencies into the jar ? 回答1: sbt-assembly 0.14.0 adds shading support. sbt-assembly can shade classes from your

m2e shade eclipse “project main artifact does not exist”

允我心安 提交于 2019-12-03 22:15:13
I'm trying to make a deployment package that bundles all the dependencies of my maven module that has dependencies to another maven project in eclipse. I have this in my pom.xml <modelVersion>4.0.0</modelVersion> <groupId>com.my.proj</groupId> <artifactId>AAA</artifactId> <version>0.0.2-SNAPSHOT</version> <name>btc</name> <dependencies> <dependency> <groupId>com.another.proj</groupId> <artifactId>BBB</artifactId> <version>1.4-SNAPSHOT</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId>

Geotools cannot find HSQL EPSG DB, throws error: NoSuchAuthorityCodeException

女生的网名这么多〃 提交于 2019-12-03 19:58:04
问题 I am running Geotools inside of Apache Storm, and having a heck of a time with geotools dependency management. Every thing works when I run the storm cluster locally (windows 7 laptop), but when I deploy to the cluster I get this exception in my logs. EDIT: Here is the Java I use that calls this functionality GridCoverage2D image = new GeoTiffReader(f).read(new GeneralParameterValue[]{policy, gridsize, useJaiRead}); /** * reproject to WGS84 */ CoordinateReferenceSystem targetCRS = CRS.decode(

Maven shade plugin adding dependency-reduced-pom.xml to base directory

偶尔善良 提交于 2019-12-03 18:48:32
问题 The maven shade plugin is creating a file called dependency-reduced-pom.xml and also artifactname-shaded.jar and placing them in the base directory. Is this a bug? Should be in the target directory. Any workaround? 回答1: You can avoid having it created by setting createDependencyReducedPom to false. e.g. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>${maven-shade-plugin.version}</version> <configuration> <createDependencyReducedPom

Including a non-Mavenized dependency so it works with maven-shade-plugin

♀尐吖头ヾ 提交于 2019-12-03 14:26:57
I want to include GData Client , which doesn't use Maven, as a dependency into my Maven project. It ships as a bunch of JAR files. Additionaly, I use Maven Shade Plugin to build an executable JAR without any external dependencies (with the default configuration, no renaming/including/excluding/transforming of dependencies). How can I do that? (Just adding the JARs as resources wouldn't work, since the Shade plugin must extract them). you want to check the maven docs on installing 3rd party jars Once installed into your local maven repository, shade should be able to use them like any other