I have a multi-module maven project (say project-xxx). Lets say it consists of 5 modules:
project-xxx (war)
--> module-1 (jar)
--> module-2 (jar)
--> module-3 (jar)
--> module-4 (jar)
--> module-5 (jar)
When the maven project is built, the war
file is generated and it includes the jar files of the 5 modules as well.
Now, for a different purpose (i.e., deploy to a distributed cache, so we can run queries from command-line), I want to generate a single `jar' file as well which includes the java classes from all modules. I'm aware that it is against maven's philosophy to generate more than one artifact and I read this blog post and a few other questions on SO.
But creating this single jar file would greatly simplify a few other things in my project. What would be the best approach to go about generating this single jar file?