Sitelet https://github.com/mojohaus/versions/issues/872
Skip to content

Inconsistency between dependency-updates and property-updates #872

Description

@javier-godoy

Even if allowSnapshots is true, display-dependency-updates only detects newer dependencies up to the last release (even if there are newer snapshots), while display-property-updates is able to report the newer snapshots

For instance, if the "Snapshots" repository has com.example:foo:2.9.1-SNAPSHOT and 2.9.2-SNAPSHOT and the "Releases" repository has version 2.9.1, I get

mvn versions:display-dependency-updates
[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   com.example:foo .... 2.9.1-SNAPSHOT -> 2.9.1

mvn versions:display-property-updates
[INFO] The following version property updates are available:
[INFO]   ${com-example-foo.version} ......... 2.9.1-SNAPSHOT -> 2.9.2-SNAPSHOT
<repositories>
    <repository>
		<id>Releases</id>
		<url>https://example.com/releases</url>
	</repository>
	<repository>
		<id>Snapshots</id>
		<url>https://example.com/snapshots</url>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
		<releases>
			<enabled>false</enabled>
		</releases>
	</repository>
</repositories>

...

<dependency>
	<groupId>com.example</groupId>
	<artifactId>foo</artifactId>
	<version>${com-example-foo.version}</version>					
</dependency>

...
		
<plugin>
	<groupId>org.codehaus.mojo</groupId>
	<artifactId>versions-maven-plugin</artifactId>
	<version>2.14.1</version>
	<configuration>
		<allowSnapshots>true</allowSnapshots>
	</configuration>
</plugin>				

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions