My project has different modules.
When I tried to package using the pom.xml of the parent module, it shows the error - "Packaging jar is invalid Aggregator project need pom as packaging".
What can I do to make an executable jar of the application from maven?
To make things short: if your parent-aggregator project don't contains source code (and it's a good practice), just add this to your parent pom.xml:
If the parent project contains source code, I strongly suggest you to:
commonsa child module of your parent project
commonsmodule as a dependency of all other modules requiring it (maybe all of them)
<packaging>pom</packaging>in the parent pom.xml