Skip to content

versions:update-properties - if property is used as both dependency and plugin version exclude is not applied correctly #1199

Open
@jakub-bochenski

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions