We are trying to centralize the versions of all artifacts that we use in our code base in order to remove duplication and facilitate the task of enumerating versions.
We created a BOM pump with versions of all our artifacts and third-party artifacts and imported them (import area) in the dependencyManagement section of the pumps of each of our artifacts.
To avoid having to update every artifact every time a bom version is changed, we tried to use a range of versions when importing bom.
<dependencyManagement> <dependencies> <dependency> <groupId>com.acme</groupId> <artifactId>bom</artifactId> <version>[1.0,)</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
However, maven does not seem to know the version ranges in the dependencyManagement pom section.
I know that if the relations between our artifacts were hierarchical, we could use modules and release from the parent POM. However, unfortunately, this is not so.
This should be a common use case for maven. What are we doing wrong or what other solutions exist?
java maven dependency-management
maxmil
source share