Questions tagged [maven-assembly-plugin]

The Assembly Plugin for Maven is primarily intended to allow users to aggregate the project output along with its dependencies, modules, site documentation, and other files into a single distributable archive.

The maven-assembly-plugin supports creating of different kind of archives like zip, tar, tar.gz etc. using the assembly:single goal. One can include not only project resources, but also dependencies and arbitrary content, making this a very versatile plugin.

More information on the Maven Assembly Plugin can be found at its home page.

1088 questions
16
votes
2 answers

Exclude unused parts of dependencies from jar (Maven)

We have a small project with some heavy-weight dependencies (e.g. Spring) of which we only use small parts. Therefore, the JAR we get when packing with all dependencies weighs several megabytes, even for out two-class-server. This seems…
Raphael
  • 9,779
  • 5
  • 63
  • 94
16
votes
2 answers

maven-assembly-plugin MojoExecutionException with dependencySet as outputDirectory

In my Khatami project I'm using maven to both manage compilation and package up the result into a runnable artifact: executable shell-script at the top-level, bin/ containing the executable jar and its dependent jars. Please see what I mean…
troutwine
  • 3,721
  • 3
  • 28
  • 62
16
votes
3 answers

Create a zip with all dependencies with Maven

Possible Duplicate: With Maven, how can I build a distributable that has my project's jar and all of the dependent jars? maybe I'm blind, but can the maven assembly plugin just create a zip file containing the current project.jar and all my…
Jan
  • 2,803
  • 6
  • 36
  • 57
16
votes
3 answers

I wish to exclude some class files from my jar. I am using maven-assembly-plugin. It still adds the files. I dont get any error

I dont get any error with this code. Just that the file that I want to exclude still gets added. I am using the maven plugin for eclipse maven-assembly-plugin
user3282190
  • 165
  • 1
  • 1
  • 5
16
votes
4 answers

The maven assembly plugin moduleset sources instructions are not including any files and not matching the included modules

I have a multi-module maven project, and I'm trying to get the moduleset sources portion of the assembly plugin to work. I have modules "module_parent", "module_a", and "module_assembly". module_a and module_assembly are children of module_parent. …
marathon
  • 7,881
  • 17
  • 74
  • 137
15
votes
4 answers

Merge properties files with Maven assembly

I have a problem with maven assembly plugin. I have a maven project which use several jars. Each jar contains configuration files. With another project, I use maven assembly plugin to assemble all configurations in unique jar. All work fine but…
Kiva
  • 9,193
  • 17
  • 62
  • 94
15
votes
1 answer

Running executable jar created by maven-assembly: Error: Could not find or load main class

Trying to create a fat jar including all the dependencies using maven-assembly plugin. Tried a bunch of things, but end up with main class not found error. Seems like I've hit a wall, been here for a few hours now. pom.xml snippet:
user2354302
  • 1,833
  • 5
  • 23
  • 35
15
votes
1 answer

how to add arbitrary information in manifest from maven assembly plugin

i use the assembly plugin to create a uber jar from several maven artifacts. Now I like to add some company specific entries into the Manifest of the created assembly jar. But how ? the archive element doesnt allow arbitrary elements (or is there a…
Emerson
  • 1,327
  • 2
  • 15
  • 24
15
votes
6 answers

Exception starting Spring application from Java

I am able to compile and start my Spring project using Maven: mvn -e clean compile exec:java -Dexec.mainClass=de.fraunhofer.fkie.tet.vmware.manager.Test However, when I assemble all jars in a single file using the maven-assembly-plugin (including…
rmv
  • 3,195
  • 4
  • 26
  • 29
15
votes
2 answers

Creating a tar.gz archive with Maven

I have a Maven project, where under src/main directory there is a sub dir called output. this folder needs to be packaged into tar.gz. when using the assembly plugin as follows: From the pom.xml: front
rperez
  • 8,430
  • 11
  • 36
  • 44
14
votes
3 answers

Maven: how to specify which assembly plugin execution runs

I have a pom with multiple assembly executions. When I run, e.g. mvn package, it runs all the executions. How can I tell it to only run the foo execution?
David Phillips
  • 10,723
  • 6
  • 41
  • 54
13
votes
1 answer

Trouble getting started with maven assembly plugin

I'm sorry to sound ignorant here, but I'm new to Maven, and have been banging my head against something that I'm sure is quite simple. The docs say: [...] a project could produce a ZIP assembly which contains a project's JAR artifact in the root…
JStroop
  • 475
  • 1
  • 8
  • 21
13
votes
2 answers

java maven rebuild dependency

I have a project which has dependency A. Project is packing into WAR and dependency A - into jar. And another dependency B, which also depends on A. I want to pack project and when project B is packing it must rebuild its dependency A instead of…
jdevrr
  • 131
  • 1
  • 1
  • 3
13
votes
3 answers

maven: multi-module project assembly into single jar

I have a multi-module project and want to create a single jar containing the classes of all my modules. Inside my parent POM, I declared the following plugin: org.apache.maven.plugins
Jeroen
  • 527
  • 2
  • 7
  • 19
13
votes
3 answers

Maven Assembly Plugin - install the created assembly

I have a project that simply consists of files. I want to package those files into a zip and store them in a maven repository. I have the assembly plugin configured to build the zip file and that part works just fine, but I cannot seem to figure…
Walter White