Search code examples
javamavenmaven-assembly-plugin

Maven Assembly: DependencySet or ModuleSet


I have a multi-module project:

Assembly-Project
--------- Module1
--------- Module2

I want to collect the jars of the modules in my assemby (zip).
What is the best way to archive that? Using moduleSets or dependenySets or both? I simply want to put the module jars into a lib folder in the zip and all the modules are in the modules section of the assembly project, cause I want to build them before assembling the zip.

Any hints? Tipps? Best practices?

Best,
Jan


Solution

  • Here's how I've done it for the SoftSmithy project:

    https://github.com/SoftSmithy/softsmithy-lib/blob/3d4cdaa74febe37bc58420e25dd340c0d0d1cd17/src/main/assembly/dist.xml

    Here is the generated zip file: http://sourceforge.net/projects/softsmithy/files/softsmithy/v0.3/

    Here is the corresponding multi-module pom: https://github.com/SoftSmithy/softsmithy-lib/blob/3d4cdaa74febe37bc58420e25dd340c0d0d1cd17/pom.xml

    (I used moduleSets.)