I'm trying to create an assembly for a large (over 100 modules) multi-module Maven project.
Some, but not all, modules have various files that need to be included in the final assembly but I am having difficulty figuring out how to get them there.
Here's the layout of a typical module:
+- pom.xml
+- src
| +- main
| +- java
| +- ...
| +- resources
| +- ...
| +- scripts
| +- ...
This module has JAR packaging so the primary artifact is a JAR file.
Here's the desired format of the final assembly:
+- bin
| +- <union of all files from src/main/scripts in the various modules>
+- lib
| +- <union of all JAR files produced by the various modules>
I know how to do the lib part of the assembly structure but I have no idea how to accomplish the bin part.
This blog post seems to suggest that each module should be creating its own assembly (essentially an assembly fragment) which would all then be aggregated together by my actual assembly component.
Is that the way this is done in Maven? It seems awfully heavyweight & slow. Is there a different/better way?
Before answering, please bear in mind the following facts:
Unfortunately I couldn't find a better answer besides creating an assembly-of-assemblies. It looks like we'll be writing our own Maven plugins to handle this requirement as using an assembly-of-assemblies is way too cumbersome given our situation.