Java – invalid wrapper jar. The aggregator project requires POM as a wrapper
>In my project, I have different modules
But when I try to put the POM in the parent module When packaging in XML, an error will be displayed, that is, "the packaging jar is invalid, and the aggregator project needs POM as the packaging"
I want to make the application executable jar from maven, so what is the solution to this problem, and there are other solutions
Solution
To simplify things: if your parent aggregator project does not contain source code (which is a good practice), just add it to your parent POM XML:
<packaging>pom</packaging>
If the parent project contains source code, I strongly recommend that you:
>Move this code to a new module (we call it Commons) make Commons is a child module of your parent project > Add commons module as a dependency of all other modules that need it (these may be) > Add < packaging > POM < / packaging > in the parent POM In XML