maven-shade-plugin

Apache spark Hive, executable JAR with maven shade

三世轮回 提交于 2019-11-28 04:05:50
问题 I'm building apache-spark application with Apache Spark Hive. So far everything was ok - I've been running tests and whole application in Intellij IDEA and all tests together using maven. Now I want to run whole application from bash and let it run with local single-node cluster. I'm using maven-shade-plugin to build single executable JAR. Application crashes when it tries to create new HiveContext out of SparkContext. Thrown exception tells me that hive can't create metastore because there

Netbeans: project's main artifact is processed through maven-shade-plugin

一个人想着一个人 提交于 2019-11-28 03:08:44
问题 I am building my project with maven-shade-plugin and Netbeans 8.0 is complaining with the following warning: Project's main artifact is processed through maven-shade-plugin When the final artifact jar contains classes not originating in current project, NetBeans internal compiler cannot use the sources of the project for compilation. Then changes done in project's source code only appears in depending projects when project is recompiled. Also applies to features like Refactoring which will

Maven shade jar throw exception

戏子无情 提交于 2019-11-27 22:59:17
I have the following Exception: Exception in thread "main" java.lang.SecurityException: no manifiest section for signature file entry javax/security/cert/CertificateException.class at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:380) at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:231) at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176) at java.util.jar.JarVerifier.processEntry(JarVerifier.java:288) at java.util.jar.JarVerifier.update(JarVerifier.java:199) at java.util.jar.JarFile

Invalid or corrupt JAR File built by Maven shade plugin

安稳与你 提交于 2019-11-27 19:18:52
After adding the Maven jFree dependency to my existing application, I'm not able to execute the created jar. The only error message I get is the following: java -jar target/com.company.product-1.0.0-SNAPSHOT.jar Error: Invalid or corrupt jarfile target/com. company.product-1.0.0-SNAPSHOT.jar The complete pom.xml looks like this: <?xml version="1.0" encoding="UTF-8"?> <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0<

Using Maven shade plugin in a multi module project - NullPointerException

随声附和 提交于 2019-11-27 16:10:27
问题 I have a scenario where-in I need to create an uber jar of a multi module maven project including all modules and their dependencies. I tried using maven shade plugin. but it seems to work only when I use it at the module level. If I add the plugin entry in parent pom then the build breaks (it tries to shade the parent pom) [INFO] Replacing original artifact with shaded artifact. [INFO] Replacing null with C:\Projects\foo.bar\target\foobar-0.0.1-SNAPSHOT-shaded.pom [INFO] --------------------

Maven build [WARNING] we have a duplicate class

戏子无情 提交于 2019-11-27 14:57:04
Anybody has any idea what happened to my maven build? I am getting a lot of duplicate warnings. [WARNING] We have a duplicate org/apache/commons/logging/impl/LogFactoryImpl$1.class in /home/shengjie/.m2/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar [WARNING] We have a duplicate org/apache/commons/logging/impl/LogFactoryImpl.class in /home/shengjie/.m2/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar [WARNING] We have a duplicate org/apache/commons/logging/impl/NoOpLog.class in /home/shengjie/.m2/repository/commons-logging

What is the purpose of dependency-reduced-pom.xml generated by the shade plugin?

此生再无相见时 提交于 2019-11-27 13:23:40
问题 I read over the docs and didn't find anything that talks about what it's used for. 回答1: The shade:shade Mojo is quite well documented, here especially about the createDependencyReducedPom parameter, which will create that dependency-reduced-pom.xml file: maven-shade-plugin/shade-mojo.html#createDependencyReducedPom In short, this is quite useful if you intend to use that shaded JAR (instead of the normal JAR) as a dependency for another module. That dependency-reduced-pom.xml will not contain

XParseException:schema_reference.4:Failed to re...

旧城冷巷雨未停 提交于 2019-11-27 07:48:15
异常如图: 平时可以正常运行的springMVC项目,在用maven加入依赖,添加jar包后运行,出现如下异常: XParseException:schema_reference.4:Failed to read schema document 如下: 异常提示:找不到xsd文件,在spring的web.xml文件写好基本配置之后,配置文件《servlet-name》-servlet.xml文件中的beans定义的xsi:schemaLocation为,如图: 首先要知道:spring在加载xsd文件时总是先试图在本地查找xsd文件(spring的jar包中已经包含了所有版本的xsd文件), 在很多spring的jar包里,在MERA-INF目录下都有一个spring.schemas,这是一个property文件, 如图为使用maven配置的spring-beans-3.0.3的jar包下的META-INF目录下的spring.schemas目录; 异常出现的原因: 实际上,这个文件就是spring关于xsd文件在本地存放路径的映射,spring就是通过这个在本地查找xsd文件的;在排除URL输入有误之后,声明的xsd文件找不到可能就是在本地不存在。一般来说,新版本的spring jar包会将所有(应该是自x.0以后)的xsd打包,并在spring.schemas文件中加入对应项

Run *.exe file from inside JAR

守給你的承諾、 提交于 2019-11-27 07:19:02
问题 I have a huge JAR file, which I created with Maven Shade plugin. I run this with java -jar foo.jar , and my UI opens. Now I want to execute *.exe file, which is also in that JAR file, how can I do this? I tried putting the exe to my classpath and run it from there, but after trying I found out that classpath is actually the location, where my JAR is. Any suggestions? Found this thing here, but is this really the best solution? Seems like alot of work, I think I have different case here,

How to create spring-based executable jar with maven?

人盡茶涼 提交于 2019-11-27 03:43:35
I have a Maven based Spring-WS client project that I want to package as a single jar. In eclipse, everything runs properly. When I try to package it as an executable jar, I get ClassNotFound exceptions since the Spring jars are not included in my application jar. So I added the maven-shade-plugin to include all my dependencies in my application jar. When I look at my app jar, I see all the class files from all the dependencies included (all the library jar's are exploded). <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6