Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Version RELEASE or LATEST for parent pom

Tags:

maven

From maven 3.5.2, the following warning is displayed if a dependency's version is set to RELEASE or LATEST:

[WARNING] 'dependencies.dependency.version' for <groupId>:<artifactId>:jar is either LATEST or RELEASE (both of them are being deprecated)

This warning is not given if the pom's parent version is set to e.g. RELEASE:

<parent>
    <groupId>com.mydomain</groupId>
    <artifactId>base</artifactId>
    <version>RELEASE</version>
</parent>

Is this intentional, so that we can safely continue to rely on RELEASE version for the parent pom?

Our use case is that we host a service for ~100 tenants that need a common set of profiles and some dependency management etc. This common configuration is defined in our 'base' pom which is used as parent by each tenant's pom. We need all tenants to use the same version, and the latest released version, of our parent pom.

like image 318
gjoranv Avatar asked Feb 13 '26 07:02

gjoranv


1 Answers

We had a similar situation: We have parent poms that are used by hundreds of projects by dozens of developers. In Ant, we had an approach similar to the RELEASE one, but now we have explicit version numbers.

Every developer needs to run versions:update-parent to get the new version, otherwise he/she stays with the old one. The disadvantage is that several versions of the parent pom are in use, the advantage is build stability because the "parent pom people" cannot destroy the builds by a wrong configuration that is drawn implicitly.

In your case, I would advice you to think whether you really need everybody to use the same version. If you really need this, you probably have to use version ranges as [1.0.0,).

like image 172
J Fabian Meier Avatar answered Feb 15 '26 17:02

J Fabian Meier