maven-assembly-plugin

maven-assembly-plugin doesn't add dependencies with system scope

独自空忆成欢 提交于 2019-12-28 03:05:07
问题 This is my pom file: <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</modelVersion> <groupId>com.sia.g7</groupId> <artifactId>sia</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>sia</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>log4j</groupId> <artifactId

Creating Two Executable Jars Using maven-assembly-plugin

橙三吉。 提交于 2019-12-27 22:03:44
问题 I have a Maven project and I want to create two executable jar files from it. One will be used interactively by users and a second will be run as a scheduled job that reads the log files produced by the former. In the end, I would expect the two jar files to be identical except for the Main-Class attribute in the MANIFEST.MF file. I am using maven-antrun-plugin to create an executable jar and this seemed to be working fine until I tried to create a second jar file by introducing Maven

Maven assembly jar: JCE cannot authenticate the provider BC

走远了吗. 提交于 2019-12-25 18:02:18
问题 I'm developing an app that takes a XML file, sends it to a server, and receives some data in response. I need to package it into an .exe(legacy reasons), and for that I need a jar. I intend to use assembly plugin to package the app into a jar with all the dependencies. The app works fine when run from the IDE with mvn clean package exec:java -Dexec.mainClass="cz.tomasdvorak.eetdemo.Main" -Dexec.args="C:\\eetTesting\\testtrzba.xml" but as soon as I build the standalone .jar with mvn clean

exception NoClassDefFoundError from deploy spring project with maven assembly

£可爱£侵袭症+ 提交于 2019-12-25 17:43:34
问题 i'm trying to build an executable jar with dependencies for a spring project. my pom: <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</modelVersion> <parent> <groupId>com.xxx</groupId> <artifactId>xxx</artifactId> <version>3.0.x-SNAPSHOT</version> </parent> <groupId>com.mindcite</groupId> <artifactId>mindcite-rdfizer-tool

one jar with one class and main class from dependecy jar

假装没事ソ 提交于 2019-12-24 19:26:25
问题 I am having one project with two classes named as Test1 and Test2 . Both Test1 and Test2 are not main classes. Now I have one dependency named cloudexe.jar which has a main class ClassExecuter . Now my issue is that I want ClassExecuter as the main class for both test1.jar and test2.jar . test1.jar should contains only Test1 class and all its dependencies including cloudexe.jar similarly test2.jar should contains only Test2 class and all its dependencies including cloudexe.jar Now when my

Assembly descriptor: Unpack-include exclusively?

匆匆过客 提交于 2019-12-24 16:07:47
问题 Description While working through a large multi-module project I discovered a custom Assembly Descriptor file. What I don't fully understand is the following, especially the includes section. <assembly [...]> [...] <dependencySets> <dependencySet> <scope>provided</scope> <unpack>true</unpack> <unpackOptions> <includes> <include>defaults*.properties</include> </includes> </unpackOptions> <outputFileNameMapping> ${artifact.artifactId} </outputFileNameMapping> <includes> <include>${project

Maven dependency exclusions in pom.xml are not excluded by assembly

不打扰是莪最后的温柔 提交于 2019-12-24 05:45:11
问题 So I have a project in which I've excluded all of the transitive dependencies from one of my dependencies (oracle jdbc stubbornly pulls in all of the jars someone might need, which causes issues for me by replacing my xml parser). My project's assembly uses a dependencySet to pull in the jars that I need, but this doesn't respect these exclusions at all: the jars that should be excluded are showing up in the final package. I know that I can explicitly exclude these dependencies in the

spark - Exception in thread “main” java.sql.SQLException: No suitable driver

喜夏-厌秋 提交于 2019-12-24 03:07:21
问题 SOLVED: prop.setProperty("driver", "oracle.jdbc.driver.OracleDriver") this line must be added to the connection properties. I'm trying to lunch a spark job in local. I created a jar with dependencies by maven. This is my pom.xml <?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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0<

How to package a jar and all dependencies within a new jar with maven

≯℡__Kan透↙ 提交于 2019-12-24 00:58:02
问题 I have a maven project with like ten dependencies. Before, I used to pack all of that in a single jar thanks to maven-assembly-plugin : <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>create-executable-jar</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptors> <descriptor>assembly.xml</descriptor> </descriptors> <archive> <manifest> <mainClass>myApp.Main</mainClass> </manifest> </archive> <

maven assembly dependencySet empty

心不动则不痛 提交于 2019-12-23 23:33:31
问题 Im trying to setup what I think is a simple assembly, taking the jars from several modules and putting them in a specific folder inside a zip. The resulting assembly should look like so: ir4job\ ir4job\app_lib\ ir4job\app_lib\ jar files go here But maven is giving me an empty zip file when the assembly is generated Assembly descriptor: <assembly> <!-- ir4job folder contents --> <id>ir4job-app</id> <formats> <format>zip</format> </formats> <includeBaseDirectory>false</includeBaseDirectory>