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

Plugin cannot update child versions when pom path specified #505

Closed
fatihafizoglu opened this issue Nov 16, 2021 · 0 comments · Fixed by #805
Closed

Plugin cannot update child versions when pom path specified #505

fatihafizoglu opened this issue Nov 16, 2021 · 0 comments · Fixed by #805
Labels
Milestone

Comments

@fatihafizoglu
Copy link

fatihafizoglu commented Nov 16, 2021

Project structure:

.
└── parent
    ├── moduleA
    │   └── submoduleB

parent pom.xml

  <groupId>org.example</groupId>
  <artifactId>parent</artifactId>
  <packaging>pom</packaging>
  <version>1.0-SNAPSHOT</version>
  <modules>
    <module>moduleA/pom.xml</module>
  </modules>

moduleA pom.xml

  <parent>
    <artifactId>parent</artifactId>
    <groupId>org.example</groupId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>moduleA</artifactId>
  <packaging>pom</packaging>
  <modules>
    <module>submoduleB/pom.xml</module>
  </modules>

submoduleB pom.xml

  <parent>
    <artifactId>moduleA</artifactId>
    <groupId>org.example</groupId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.example.moduleA</groupId>
  <artifactId>submoduleB</artifactId>

Command:

mvn org.codehaus.mojo:versions-maven-plugin:2.8.1:set -DnewVersion=123456

Expected behaviour:
All 1.0-SNAPSHOT versions to be replaced with 123456

What happens:
Only versions in root pom.xml and moduleA/pom.xml is updated, the one in submoduleB/pom.xml stays the same

Note:
When pom.xml paths not specified, plugin works correctly and updates all of them successfully

andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Nov 2, 2022
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Nov 3, 2022
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Nov 3, 2022
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Nov 3, 2022
@slawekjaranowski slawekjaranowski added this to the 2.14.0 milestone Nov 3, 2022
slawekjaranowski pushed a commit that referenced this issue Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants