Social Media

Maven bill of materials (bom)

The purpose of a bill of materials(bom) is to centrally manage Maven dependencies and reduce the chances of version mismatches. The concept is orignally from supply chain management where it is used to track parts.

The key points of boms are –

  • Special maven project to centrally manage dependencies
  • Managed in dependencyManagement section of type – <type>pom</type>
  • Allow dependencies to cascade down through projects using <dependencyManagement>
  • The bill of materials pom.xml will only list supported versions
  • Simplify dependency import in child projects because you do not need to specify dependency versions

Example

One advantage of bill-of-materials is that you can set out the recommended version dependencies, and use these through your application framework-

You can then import dependencies in sub-project pom’s without version numbers –

Reference

http://docs.spring.io/spring/docs/current/spring-framework-reference/html/overview.html

About the Author Martin Farrell

My name is Martin Farrell. I have almost 20 years Java experience. I specialize inthe Spring Framework and JEE. I’ve consulted to a range of businesses, and have provide Java and Spring mentoring and training. You can learn more at About

follow me on:

Leave a Comment: