Using area import with version ranges

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?

+7
java maven dependency-management
source share

No one has answered this question yet.

See related questions:

3324
How to generate random integers in a specific range in Java?
1520
How to fix java.lang.UnsupportedClassVersionError: Unsupported version of major.minor
646
Work with "Xerces hell" in Java / Maven?
7
Centralizing the plugin version in a (somewhat similar) specification?
4
Is it possible to override the imported Maven dependency in the same pom.xml?
3
How to make maven versions: use the latest versions to increase imports in a dependent service?
3
Import and dependency management in Maven
3
Import maven property used in material specification (bom)
one
Imported Maven dependencies are not allowed when used in a profile
one
Maven - dependency management in parent and import space

All Articles