8000 Recipe to find maven modules that have no parent by JohannisK · Pull Request #5639 · openrewrite/rewrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Recipe to find maven modules that have no parent #5639

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

JohannisK
Copy link
Contributor

What's changed?

Added a recipe to mark Maven Modules that have no parent

What's your motivation?

When adding recipe (as part of it's changes) adds a maven parent, the current implementation of the AddParentPom recipe does notting when a parent is already present.

Especially when changes in the recipe depend on the correct parent being present this will cause unexpected and breaking changes.

With this recipe the module can be marked when there is no parent, so it can be used as a precondition for a recipe that requires the correct parent to be present.

@JohannisK JohannisK self-assigned this Jun 19, 2025
@JohannisK JohannisK added the recipe Requested Recipe label Jun 19, 2025
return tree;
}
JavaProject jp = maybeJp.get();
if (!acc.getProjectsWithParent().contains(jp)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reasoning for this recipe being a scanning recipe?
I don't see why you couldn't just call parentPomInsight here and save the scanning cycle of the recipe :)

@JohannisK JohannisK marked this pull request as draft June 23, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe Requested Recipe
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants
0