Maven
Fleeting- 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.
‘dependencies.dependency.version’ for X must be a valid version but is ‘Y’
- Référence externe : https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/468
‘dependencies.dependency.version’ for com.org-id.service:project-module-b:jar must be a valid version but is ‘${git.commit.time}.${git.commit.id.abbrev}’ · Issue #468 · git-commit-id/git-commit-id-maven-plugin
- see,
Maven is not designed for dynamic versions and whenever you try to specify a dynamic version you’ll get ‘version’ contains an expression but should be a constant..
— https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/468
plugin-management
- Référence externe : https://maven.apache.org/pom.html#plugin-management
pluginManagement: is an element that is seen along side plugins. Plugin Management contains plugin elements in much the same way, except that rather than configuring plugin information for this particular project build, it is intended to configure project builds that inherit from this one. However, this only configures plugins that are actually referenced within the plugins element in the children or in the current POM. The children have every right to override pluginManagement definitions.
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.
— https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#what-is-a-pom
super POM
- Référence externe : https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#super-pom
The Super POM is Maven’s default POM. All POMs extend the Super POM unless explicitly set, meaning the configuration specified in the Super POM is inherited by the POMs you created for your projects.
– https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#super-pom
Notes pointant ici
- 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)
- git-commit-id-maven-plugin
- 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?