Skip to content

Property in depdencyManagement of parent pom not changed, version tag added in submodul pom #4183

Open
@Evodam

Description

I just ran the following command:

mvn org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-hibernate:RELEASE -Drewrite.activeRecipes=org.openrewrite.hibernate.MigrateToHibernateDependencies61

The project on which I applied it has a parent-pom and multiple submodule-poms. The parent-pom has a dependencyManagement section where versions are defined using properties. The submodules only list the dependencies without version declaration.

This was before open rewrite:
parent pom:

<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-core</artifactId>
  <version>${hibernate.version}</version>
</dependency>

submodul pom:

<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-core</artifactId>
</dependency>

This after:
parent pom:

<dependency>
  <groupId>org.hibernate.orm</groupId>
  <artifactId>hibernate-core</artifactId>
  <version>6.1.0.Final</version>
</dependency>

submodul pom:

<dependency>
  <groupId>org.hibernate.orm</groupId>
  <artifactId>hibernate-core</artifactId>			
  <version>6.1.0.Final</version>
</dependency>

OpenRewrite replaced the property in the parent pom (instead of changing it) and added a version tag to the submodul pom although it isnt necessary there

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

    bugSomething isn't workingtest providedAlready replicated with a unit test, using JUnit pioneer's ExpectedToFail

    Type

    No type

    Projects

    • Status

      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions