spring-projects-experimental / spring-boot-migrator

Spring Boot Migrator (SBM) is a tool for automated code migrations to upgrade or migrate to Spring Boot
Apache License 2.0
451 stars 89 forks source link

Epic: Extract OpenRewrite parser #844

Open fabapp2 opened 1 year ago

fabapp2 commented 1 year ago

What needs to be done

The parsing logic to create the OpenRewrite AST from given resources should be extracted. The currently used MavenProjectParser should then be replaced by this component.

Why it needs to be done

Parsing a given project to OpenRewrite AST is a mandatory step to apply OpenRewrite recipes. Currently, two open-sourced build tool plugins exist that allow applying recipes inside a build. Providing a parser that creates the AST outside of a build tool plugin is required for other projects too. Extracting the parser allows reusing this component in these projects.

Acceptance Criteria

/info panel Given precondition When action Then result

Additional Information

shresthaujjwal commented 1 year ago

@fabapp2 any idea when the support for custom maven settings.xml support would be added ? Adhere to ~/.m2/settings-security.xml and ~/.m2/settings.xml

fabapp2 commented 1 year ago

Hi @shresthaujjwal

it should be working with the current parser used in isolation when using RewriteMavenProjectParser which replicates works as with the rewrite-maven-plugin. It needs to be incorporated into the RewriteProjectParser and can be taken fron here. I will find or create an issue for this.