This is a greeter project. The running of the main class in this project prints a
"Good [morning, afternoon or evening], today is: <yyyy-MM-dd>".
The datetime-fetcher module provides the local date time as well as a mapper to time periods of morning, afternoon and evening. The module-info.java exports and opens packages for use in other modules. The POM declares itself a child of the aggregator root POM.
The greeting module formats the date time information and time period into a string. The module-info.java specifies the requirement of the datetime-fetcher module and exports the greeting classes for use in other modules. The POM declares itself a child of the aggregator root POM and among other things, declares a dependency on the datetime-fetcher jar.
The greeting-generator module invokes the greeting module. The module-info.java specifies the requirement of the greeting module. The POM declares itself a child of the aggregator root POM and among other things, declares a dependency on the greeting jar.
Maven has a concept of modules that define project structure to better organize grouping of code and provide for a possible independent control of versions and dependencies. A POM declaring modules specifies a downward hierarchy of sub-projects that are aggregated. A child POM can additionally declare a parent to declare an upward hierarchy for the specific subproject.
IntelliJ modules are quite similar in perspective to maven modules. IntelliJ modules focus on specific JDK versions, customizable sources and resources per module etc. Each module notably, has a specific entry in the .idea/modules.xml and .idea/compiler.xml, among other things.
.
|____pom.xml <----- Aggregator (reactor) POM parent for all others
|____IDE <----- IDE Run Configuration for a maven clean install
|____README.adoc <----- This file
|____datetime-fetcher
| |____pom.xml <----- datetime-fetcher child POM
| |____src
| | |____main
| | | |____java
| | | | |____module-info.java <----- Exports and Opens a few packages
| | | | |____none
| | | | | |____cvg
| | | | | | |____maven
| | | | | | | |____datetime
| | | | | | | | |____fetch <----- Package exported (and open)
| | | | | | | | |____runtime <----- Package opened
| | |____test
| | | |____java
| | | | |____none
| | | | | |____cvg
| | | | | | |____maven
| | | | | | | |____datetime
| | | | | | | | |____fetch <----- Package exported (and open)
|____greeting
| |____pom.xml
| |____src
| | |____main
| | | |____java
| | | | |____module-info.java <----- Requires datetime-fetcher & exports greeting
| | | | |____none
| | | | | |____cvg
| | | | | | |____maven
| | | | | | | |____greeting <----- Package exported
|____greeting-generator
| |____pom.xml
| |____src
| | |____main
| | | |____java
| | | | |____module-info.java <----- Required modules declared
| | | | |____none
| | | | | |____cvg
| | | | | | |____maven
| | | | | | | |____datetime
| | | | | | | | |____greetinggen