- Référence externe : https://en.wikipedia.org/wiki/Apache_Maven
Outil de compilation/packaging de java.
Maven is a build automation tool used primarily for Java projects. Maven can also be used to build and manage projects written in C#, Ruby, Scala, and other languages.
Project Object Model
- Référence externe : https://maven.apache.org/pom.html
- Référence externe : https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#what-is-a-pom
Maven – POM Reference
The packaging type required to be pom for parent and aggregation (multi-module) projects. These types define the goals bound to a set of lifecycle stages. For example, if packaging is jar, then the package phase will execute the jar:jar goal. Now we may add values to the parent POM, which will be inherited by its children. Most elements from the parent POM are inherited by its children, including
A project with modules is known as a multi-module, or aggregator project
A pom packaged project may aggregate the build of a set of projects by listing them as modules, which are relative paths to the directories or the POM files of those projects
Maven will topologically sort the modules such that dependencies are always build before dependent modules.
However, an aggregator project and a parent project are both POM projects, they are not one and the same and should not be confused. A POM project may be inherited from - but does not necessarily have - any modules that it aggregates. Conversely, a POM project may aggregate projects that do not inherit from it.
A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects. Examples for this is the build directory, which is target; the source directory, which is src/main/java; the test source directory, which is src/test/java; and so on. When executing a task or goal, Maven looks for the POM in the current directory. It reads the POM, gets the needed configuration information, then executes the goal.
- Référence externe : https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#super-pom
Notes pointant ici
- ‘dependencies.dependency.version’ for X must be a valid version but is ‘Y’
- avoid specifying the version several times in maven
- best practices for structuring maven projects and modules
- bill of materials
- dependency management
- dependency management and versioning with a maven multi-module project
- difference between maven inheritance (parent) and maven aggregation (module)
- how to correctly structure a maven project
- in Maven, how output the classpath being used?
- maven dependency mechanism
- Maven getting started guide
- maven packages in the gitlab package repository
- maven pom packaging
- maven profile
- maven project aggregation
- maven project inheritance
- maven reactor
- Maven Release plugin – release:update-versions
- maven standard directory layout
- Maven – Guide to Working with Multiple Modules
- why git-commit-id-maven cannot be used with best practices of maven?