spring-boot-migrator
spring-boot-migrator copied to clipboard
Enhance Maven multi-module support
What needs to be done
Currently there's no pendant to ProjectJavaSources that allows to apply a recipe against all BuildFiles.
Why it needs to be done
Imagine a (fictive) OpenRewrite recipe ChangeMavenPropertyName that changes the name of a property.
This recipe needs to have access to all pom.xml build files in a multi-module project.
Imagine the property to be declared in the root module and used in some child module(s).
To change the property name all pom files using or declaring this property must be changed.
A similar concept exists for JavaSources with ProjectJavaSources.apply(Recipe) which would provide all java sources to the recipe. The pendant for build files is missing and a recipe as in the given example could not (easily) be applied to all build files.
Additional Information
- See
JavaRefactoringandJavaGlobalRefactoring - See
MavenBuildFileRefactoringwhich provides a method to apply a recipe to multiple pom files.
HI @ravig-kant as discussed. Please feel free to discuss this here in comments.
Sure. I will start working on this issue from this week.