Skip to content

Conversation

@dpozinen
Copy link
Contributor

What's changed?

Fix bug where java version property would be add to all submodules of a project instead of only to the root pom

Any additional context

I was having issues with org.openrewrite.java.migrate.UpgradeToJava21

Specifically, it adds the <java.version> property to each submodule, even if the parent module (in the same repo) already contains this property.
I believe this is because of this logic in UpdateMavenProjectPropertyJavaVersion which checks if relativePath has a value.

But the problem is that in most cases relativePath is omitted completely, because if not specified, it defaults to ../pom.xml .
Now I realise the use case of <relativePath/> so it was preserved.

@timtebeek timtebeek self-requested a review November 21, 2024 21:02
@sambsnyd
Copy link
Member

Merged this here: 02c1a54

Thanks for reporting!

@sambsnyd sambsnyd closed this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants