Skip to content

Why does versions plugin propose non-stable versions by default? #1350

@reimer-atb

Description

@reimer-atb

Running mvn versions:display-property-updates on a pom.xml with plugin and dependency definitions like this:

  <properties>
    <compiler-plugin.version>3.15.0</compiler-plugin.version>
    <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
    <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
    <quarkus.platform.version>3.32.2</quarkus.platform.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>${quarkus.platform.group-id}</groupId>
        <artifactId>${quarkus.platform.artifact-id}</artifactId>
        <version>${quarkus.platform.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
...
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${compiler-plugin.version}</version>
        <configuration>
          <parameters>true</parameters>
        </configuration>
      </plugin>
...
    </plugins>
  </build>

results in this output:

[INFO] The following version property updates are available:
[INFO]   ${compiler-plugin.version} ................... 3.15.0 -> 4.0.0-beta-4
[INFO]   ${quarkus.platform.version} .................... 3.32.2 -> 3.34.0.CR1

In this case display-property-updates also hides from me the fact that there is new "stable" patch release 3.32.3 available for ${quarkus.platform.version}.

And a corresponding mvn versions:update-properties will update to these non-stable versions:

[INFO] Updated ${quarkus.platform.version} from 3.32.2 to 3.34.0.CR1
[INFO] Updated ${compiler-plugin.version} from 3.15.0 to 4.0.0-beta-4

I would have expected that versions plugin treats versions with CR..., alpha-..., beta-... etc. like SNAPSHOT versions, and ignores them by default.

Having these kind of non-stable preview releases seems to be quite common - even core maven plugins do it (see ${compiler-plugin.version}.

At the same time I would think that most people by default want to avoid non-stable preview releases, and usually only update to stable releases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions