Skip to content

Version 2.21.0 cannot set the new version when using "relativePath" to locate share parent module or import a internal bom module in "dependencyManagement" #1339

Closed

Description

@SingKS8

Version 2.21.0 cannot set the new version to the modules with paramter "newVersion".

Case 1 Using share parent module

Demo-Project
|...Project-Parent (a share parent module for project components and project tests)
|......Project-Component-A
|......Project-Component-B
|...Project-Tests (using "relativePath" to locate "Project-Parent" as parent)
|......Test-A
|......Test-B

Version 2.20.1

"mvn versions:set" would update the new version for all modules.

Version 2.21.0

"mvn versions:set" would only update the new version to the modules whose folder structure tree are as same as maven modules structure.
Like my demo, "Demo-Project", "Project-Parent" and all "Project-Component-x", have been update the new version.
"Project-Tests" and all "Test-x" are still old version.

Case 2 Using a bom module to manage project component modules

Demo-Project
|...Project-Parent 
|......Project-Component-A
|......Project-Component-B
|...Demo-Project-bom (a bom module to manage all Project-Component-x modules)
|...Project-Tests (using "dependencyManagement" to import "bom" module)
|......Test-A
|......Test-B

Version 2.20.1 will update then new version for the imported bom

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>demo</groupId>
                <artifactId>Demo-Project-bom </artifactId>
                <version>new-version</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

Version 2.21.0 cannot update the new version

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>demo</groupId>
                <artifactId>Demo-Project-bom </artifactId>
                <version>old-version</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

The version 2.21.0 seems to have a few changes about dependencies, those changes now are breaking our pipeline

Activity

  1. changed the title [-]Version 2.21.0 cannot set the version if using "relativePath" to locate a share parent module in the same project[/-] [+]Version 2.21.0 cannot set the new version when using "relativePath" to locate share parent module or import a internal bom module in "dependencyManagement"[/+] on Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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