-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
display-parent-updates does not show updates correctly #896
Comments
Please check with 2.14.2 as this is the newest release of the plugin. If the problem occurs there as well, please provide an example project (pom.xml) which reproduces the issue. |
Creating a project with <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> Test Result 2.14.2 $ mvn org.codehaus.mojo:versions-maven-plugin:2.14.2:display-parent-updates
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com.example:demo >--------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.14.2:display-parent-updates (default-cli) @ demo ---
[INFO] The parent project is the latest version:
[INFO] org.springframework.boot:spring-boot-starter-parent ......... 2.7.6
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.674 s
[INFO] Finished at: 2023-01-02T16:09:15+01:00
[INFO] ------------------------------------------------------------------------ Test Result 2.13.0 $ mvn org.codehaus.mojo:versions-maven-plugin:2.13.0:display-parent-updates
[INFO] Scanning for projects...
[versions-demo.zip](https://github.com/mojohaus/versions/files/10332345/versions-demo.zip)
[INFO]
[INFO] --------------------------< com.example:demo >--------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.13.0:display-parent-updates (default-cli) @ demo ---
[INFO] The parent project has a newer version:
[INFO] org.springframework.boot:spring-boot-starter-parent 2.7.6 -> 3.0.1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.030 s
[INFO] Finished at: 2023-01-02T16:12:34+01:00
[INFO] ------------------------------------------------------------------------ |
Thanks, confirmed. |
…r the retrieval of available versions if it's specified. Previously I (mistakenly) used the "recommended version" as version range, which caused artifact version retrieval to only report the given version.
Polishing... |
…wSnapshots - Version range should not be specified in the retrieval at all; removed. - If provided, the actual version range restriction should be used, and not the result of the toString() method - Also, allowSnapshots was ignored for the mojo; corrected
Thanks for the report. Running a bespoke test with the
|
- Version range should not be specified in the retrieval at all; removed. - If provided, the actual version range restriction should be used, and not the result of the toString() method - Also, allowSnapshots was ignored for the mojo; corrected
From version 2.14.0 the
display-parent-updates
does not show newer parent versions anymore.Given I have a project which has a newer parent version in our maven repository.
When I run
mvn org.codehaus.mojo:versions-maven-plugin:2.14.0:display-parent-updates
Then I expect to see
The parent project has a newer version
But instead I see
The parent project is the latest version
Running with a plugin version of 2.13.0 it gives the correct result.
The text was updated successfully, but these errors were encountered: