Organizing Maven projects
Guidelines
There are many types of Maven project relationships and many ways or organizing Maven projects. The purpose of this page is to explain some guidelines and setups that we have come to value. The main guidelines can be summarized as follows:
-
Lifecycle: Projects/modules with different release cycles should not share reactor (or trunk).
-
" One primary output per project", from BBwM, chap.1.2.1, page 27, and likewise "One project per deployment unit" (Maven FAQ)
-
Common code: Place code shared by multiple projects in a separate project.
-
When in doubt, separate!
Detailed descriptions and examples
- Project Inheritance aka. Parent POM.
- Multi-module projects aka. Aggregator projects
- Recommended directory structure using Subversion and Maven
- Maven Artifact Naming
- Example of a Release Profile