Skip to content

Show multiple newer versions for each artifact #1043

Closed

Description

@maffe

Sometimes I cannot upgrade to a new major version of a dependency yet. It would be useful to have the plugin report the newest version on each version level (major/minor/patch). For example, if I include io.dropwizard:dropwizard-client:1.0.3, display-dependency-updates currently outputs

[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   io.dropwizard:dropwizard-client ....................... 1.0.3 -> 4.0.6

and it should display instead:

[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   io.dropwizard:dropwizard-client ......... 1.0.3 -> 1.0.9, 1.3.9, 4.0.6

(5.0.0-alpha.1 is excluded by an ignoreVersion, see my configuration below.)

With this information I can easily decide to upgrade to the latest patch, minor or major version. It is not required to list more than these three versions since it can be assumed that 2.x.y and 3.x.y versions also exist. I could simply include 2.0.0 and would see 2.0.9 and 2.1.9 in the next run.

Another case is when there is no minor or patch update. If I include jakarta.xml.bind:jakarta.xml.bind-api:3.0.1, the output currently is:

[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   jakarta.xml.bind:jakarta.xml.bind-api ................. 3.0.1 -> 4.0.1

In this case the output would be the same as before, but knowing about this feature I could assume there is no 3.0.2 or 3.1.0. Or maybe the output could be modified to something like

[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   jakarta.xml.bind:jakarta.xml.bind-api .......... 3.0.1 -> 3.0.1, 4.0.1

or

[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   jakarta.xml.bind:jakarta.xml.bind-api ........ 3.0.1 -> [3.0.1], 4.0.1

My plugin configuration looks like this:

<plugin>
	<groupId>org.codehaus.mojo</groupId>
	<artifactId>versions-maven-plugin</artifactId>
	<version>2.16.0</version>
	<executions>
		<execution>
			<phase>verify</phase>
			<goals>
				<goal>display-parent-updates</goal>
				<goal>display-plugin-updates</goal>
				<goal>display-property-updates</goal>
				<goal>display-dependency-updates</goal>
			</goals>
		</execution>
	</executions>
	<configuration>
		<ruleSet>
			<ignoreVersions>
				<ignoreVersion>
					<type>regex</type>
					<version>(?i).*[.-](?:Alpha|Beta|M|RC)[.-]?[0-9]+</version>
				</ignoreVersion>
			</ignoreVersions>
		</ruleSet>
		<processDependencyManagementTransitive>false</processDependencyManagementTransitive>
	</configuration>
</plugin>

Activity

  1. github-actions commented on Jan 30, 2025

    @github-actions

    This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 30 days.

  2. jhult commented on Aug 7, 2025

    @jhult

    I agree something like this would be nice.

  3. cdprete commented on May 24, 2026

    @cdprete

    I agree as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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