Skip to content
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

versions:update-parent ignores allowSnapshots CLI parameter #727

Closed
rillner opened this issue Sep 29, 2022 · 1 comment
Closed

versions:update-parent ignores allowSnapshots CLI parameter #727

rillner opened this issue Sep 29, 2022 · 1 comment

Comments

@rillner
Copy link

rillner commented Sep 29, 2022

Until release 2.11.0, it was possible to upgrade the current parent version (in this example 1.58.5-SNAPSHOT) to a fixed SNAPSHOT version which is not necessarily the latest SNAPSHOT (in this example 1.58.6-SNAPSHOT) via:

mvn -U -DallowSnapshots=true -DparentVersion=[1.58.6-SNAPSHOT] versions:update-parent
...
[INFO] --- versions-maven-plugin:2.11.0:update-parent (default-cli) @ my-project ---
...
[INFO] Updating parent from 1.58.5-SNAPSHOT to 1.58.6-SNAPSHOT

Since release 2.12.0 (which contains #665 ), this is not possible anymore:

mvn -U -DallowSnapshots=true -DparentVersion=[1.58.6-SNAPSHOT] versions:update-parent
...
[INFO] --- versions-maven-plugin:2.12.0:update-parent (default-cli) @ my-project ---
...
[WARNING] Not updating version: could not resolve any versions

This is still a valid use case and should work as before.

The reason is, that UpdateParentMojo now calls the findLatestVersion method with parameter allowingSnapshots=false instead of null (as it was before) which leads to ignoring the allowSnapshots CLI property inside the findLatestVersion method of AbstractVersionsUpdaterMojo.

Probably providing null for allowingSnapshots method parameter was correct.

@rillner
Copy link
Author

rillner commented Sep 29, 2022

Just seen this duplicates #670

@rillner rillner closed this as completed Sep 29, 2022
@rillner rillner closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant