Bill of Materialsfleeting
- External reference: https://www.baeldung.com/spring-maven-bom
Spring with Maven BOM | Baeldung
Project Object Model (POM), can make use of a BOM or “Bill Of Materials”.
Maven POM is an XML file that contains information and configurations (about the project) that are used by Maven to import dependencies and to build the project.
A BOM is a special kind of POM that is used to control the versions of a project’s dependencies and provide a central place to define and update those versions.
Simply put, Dependency Management is a mechanism to centralize the dependency information.
we can put all dependency information in a shared POM file called BOM
the BOM is a normal POM file with a dependencyManagement section where we can include all an artifact’s information and versions
We can inherit from the parent
We can also import the BOM.
can inherit only a single parent
import as many BOMs as we need
<dependencyManagement> <dependencies> <dependency> <groupId>baeldung</groupId> <artifactId>Baeldung-BOM</artifactId> <version>0.0.1-SNAPSHOT</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> </project>
Notes linking here
- best practices for structuring maven projects and modules
- maven dependency mechanism
- nomenclature (bill of materials)
- why git-commit-id-maven cannot be used with best practices of maven?