-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
None
-
False
-
False
-
-
---
-
---
-
-
None
mbrophy requested:
Now the openrewrite cli feature has been implemented, pcattana has asked me to provide details of its usage, to go in a new Appendix to the CLI guide, Headed A.5. Tech Preview Features with a subheading of A.5.1 Openrewrite integration:
An openrewrite auto-migration can now be called as a tech preview from the mta-cli script using this format of command:
./mta-cli --openrewrite
"-DactiveRecipes=org.jboss.windup.JavaxToJakarta" --input
/path/to/source/project --goal dryRun
Argument details:
--openrewrite
this is a flag specifying to run an openrewrite migration rather than an MTA analysis. The two cannot be run together simultaneously, it must be one or the other.
"-DactiveRecipes=org.jboss.windup.JavaxToJakarta"
This tells openrewrite which recipe to apply to the input project. JavaxtoJakarta is the default shipped recipe but a user can add their own to the shipped rewrite.yml and run that recipe instead if they so choose. The shipped rewrite.yml file is located in the rules/openrewrite/ folder in the unzipped MTA distribution.
--input
this is the path to the source project which the openrewrite migration is to be performed upon.
--goal
this is the openrewrite maven goal to run. This argument is optional, if not supplied the script will run the dryRun goal which reports on the changes and creates a patch file which can be applied later. To apply the recipe changes immediately without this stage, the run goal can be supplied as this argument instead.
- documents
-
WINDUP-3128 MTA - javax to jakarta package renaming (Openrewrite)
- Dev Complete