spring-boot-migrator icon indicating copy to clipboard operation
spring-boot-migrator copied to clipboard

Enhance Maven multi-module support

Open fabapp2 opened this issue 2 years ago • 2 comments

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 JavaRefactoring and JavaGlobalRefactoring
  • See MavenBuildFileRefactoring which provides a method to apply a recipe to multiple pom files.

fabapp2 avatar May 10 '23 11:05 fabapp2

HI @ravig-kant as discussed. Please feel free to discuss this here in comments.

fabapp2 avatar May 10 '23 11:05 fabapp2

Sure. I will start working on this issue from this week.

ravig-kant avatar May 16 '23 12:05 ravig-kant