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-properties - if property is used as both dependency and plugin version exclude is not applied correctly #1199

Open
jakub-bochenski opened this issue Dec 17, 2024 · 0 comments

Comments

@jakub-bochenski
Copy link

jakub-bochenski commented Dec 17, 2024

Running ./mvnw versions:update-properties -Dexcludes=org.jetbrains.kotlin:kotlin-bom:pom produces:

[INFO] --- versions:2.18.0:update-properties (default-cli) @ parent ---
[INFO] Updated ${kotlin.version} from 2.0.0 to 2.1.0
[INFO] --- versions:2.18.0:update-properties (default-cli) @ bom ---
[INFO] Not updating the property ${kotlin.version} because it is used by artifact org.jetbrains.kotlin:kotlin-bom:pom:2.0.0:import and that artifact is not included in the list of  allowed artifacts to be updated.

In the end the kotlin.version property is changed to 2.1.0

The kotlin.version is defined in parent.
Parent defines kotlin-maven-plugin version in pluginManagement.
bom module inherits from parent and defines a kotlin-bom version in dependencyManagement.

Workaround: add -Dexcludes=org.jetbrains.kotlin:kotlin-bom:pom,org.jetbrains.kotlin:kotlin-maven-plugin

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