Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Include one Maven assembly inside another?

Tags:

maven-2

My project generates 3/4 assemblies, 3 jars and 1 war.[I need to use assemblies itself] I need to include 2 of these assembly jars into my war. How can I ensure that before assembly war creation , other 2 jars are created ? Please respond

like image 845
user170114 Avatar asked Nov 27 '25 21:11

user170114


1 Answers

You have three choices:

  1. define all the assembly executions in one plugin configuration, and order them as needed. See this answer for more details.
  2. Define an earlier phase for your jar assemblies so that they have all been packaged before the war is packaged.
  3. Move the jar content into separate projects and specify them as dependencies of the war project so they are packaged automatically. This is the "Maven way" of handling this. It would also allow you to potentially reuse the jars in other wars.

I'd recommend option 3 myself, but the other two should both work.

like image 123
Rich Seller Avatar answered Dec 02 '25 03:12

Rich Seller