- In My project I have different modules.
- Each module have pom.xml in which packaging is a jar.
- And each pom refer to common parent.
In parent module there is also a pom.xml which includes all the modules.
But when i tried to make the packaging in the pom.xml of parent module it shows the error that is "Packaging jar is invalid Aggregator project need pom as packaging".
I want to make the executable jar of the application from maven so,what is the solution for this problem or is there is any other solution.
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:
- move this code in a new module (let's call it
commonsa child module of your parent project
- add the
commonsmodule as a dependency of all other modules requiring it (maybe all of them)
<packaging>pom</packaging>in the parent pom.xml