I am trying to understand the difference between a Maven Module and Maven Project. Which is what and where I should one? Thanks
A project can contain one or more related modules. Each module is a separate library, application and can be a jar, ear or war. Also modules aren't just Java either. You can have modules for ruby, scala, or something else as well.
A Maven module is a sub-project. To create a Maven module you will need to already have a Maven project available. The parent project must have its Packaging option pre-configured to pom, for a module to be created and associated with it.
The mechanism in Maven that handles multi-module projects is referred to as the reactor. This part of the Maven core does the following: Collects all the available modules to build. Sorts the projects into the correct build order.
A multi-module project is built from an aggregator POM that manages a group of submodules. In most cases, the aggregator is located in the project's root directory and must have packaging of type pom. The submodules are regular Maven projects, and they can be built separately or through the aggregator POM.
a maven module is like a maven "sub-project". a maven project includes 1 or more modules. more info here.
Typically, a module generates a single artifact (jar, war, zip, etc), although this is not always true.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With