views:

25

answers:

1

Hi,

I have a multi-module maven project, and I'm trying to create an assembly for the project. The assembly should be a zip file, including all of the jars from the dependent projects as well as all of the resources from those projects (this is for legacy support reasons - I know this isn't a good practice, but in this case, we really can't do much about it).

I have an assembly that builds a zip and includes the contents of the build output directory (which will get the resources). If I run that from the parent pom, it doesn't actually build a zip (presumably because the parent project is of type pom, not a jar). If I run an assembly from one of the individual projects, it does include the jars and all the dependencies (I specified including the dependencies). It includes the output directory for that project, but not the child projects.

Do I need to do something like run an assembly from the parent that iterates over the child projects and runs their assemblies (the assemblies for each of the child projects would be the same though - it would include the jar, the dependencies and the output directory)? I'm not even sure this is possible ... any guidance would be appreciated.

Thanks,

Jeff

+1  A: 

I suggest to check the whole Section 8. Maven Assemblies of the Maven: The Complete Reference book and in particular the following subsection 8.2.4. Assembling Assemblies via Assembly Dependencies. It describes a very similar requirement and a setup.

Pascal Thivent