Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between a Maven Module and a Maven Project

Tags:

I am trying to understand the difference between a Maven Module and Maven Project. Which is what and where I should one? Thanks

like image 507
Hossein Avatar asked Sep 04 '12 14:09

Hossein


People also ask

What is the difference between project and module?

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.

What is a Maven module?

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.

What is the use of modules in Maven?

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.

What is the use of multi-module Maven project?

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.


1 Answers

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.

like image 61
jtahlborn Avatar answered Sep 21 '22 18:09

jtahlborn