Hi, I'm trying to switch over to maven for a project I developing in work, new to maven and finding packaging it a little tricky.
The app I am writing has a core framework module and then a bunch of other modules that provide plugin like functionality. The idea being I can produce different builds with different combinations of modules / functionality. The confusing bit is each module specifies its own configs + other config like resources and these must be aggregated together in the build. So my project: Parent Project --Core Module ---- src/main/java ---- src/main/config ---- src/main/other_resource_directory --Module A ---- src/main/java ---- src/main/config ---- src/main/other_resource_directory --Module B ---- src/main/java ---- src/main/config ---- src/main/other_resource_directory needs to go to the final package / zipped artifact: ./core.jar ./moduleA.jar ./moduleB.jar ./config/<all configs accross all modules> ./other_resource_directory/<all other resources accross all modules> As I understand, I need to use the maven-assembly-plugin to do most of this, and to include the custom directories I need. I think I need to define each module artifact as a zip file with the target jar in it and the 2 folders. Which involves writing an assembly plugin instance in the plugin management of the parent POM and my own assembly descriptor. The idea being I can reference the plugin as an artifact in each of my sub modules, i.e: <plugin><artifactId>module-bundle</artifactId></plugin>. So I think that may work for each of my sub-modules, but I have no idea then how to process these artifacts to aggregate this into a zip in the format above. I think the artifact is I would get atm is a jar containing all the zipped artifacts from each modules. So when that artifact is being created I need to process the zips from the modules / unpackage each module and copy configs across etc. Talked to a friend who said maybe this is not quite within the maven way and he suggested gradle may be worthwhile looking into but am quite interested to know if this should be possible in maven. Thanks for any help figuring this out, Jon -- View this message in context: http://maven.40175.n5.nabble.com/Custom-assembly-of-multi-module-project-tp3256773p3256773.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
