Inconsistency between dependency-updates and property-updates #872
Closed
Description
opened on Dec 21, 2022
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