From aec3e82419ca1f83a6496b36ddec5aaa04b88452 Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Sun, 4 Feb 2024 20:08:05 +0200 Subject: [PATCH 1/2] insert mta-cli attribute instead of plain text windup-cli --- docs/topics/cli-run.adoc | 24 +++++++++---------- docs/topics/create-first-xml-rule.adoc | 2 +- ...ntellij-idea-plugin-run-configuration.adoc | 2 +- docs/topics/manually-test-rules.adoc | 2 +- docs/topics/mavenize.adoc | 2 +- docs/topics/review-reports.adoc | 2 +- .../topics/templates/document-attributes.adoc | 2 ++ docs/topics/using-openrewrite-recipes.adoc | 10 ++++---- .../vs-code-extension-run-configuration.adoc | 4 ++-- 9 files changed, 26 insertions(+), 24 deletions(-) diff --git a/docs/topics/cli-run.adoc b/docs/topics/cli-run.adoc index 058ddf2b3f..87f7f6588a 100644 --- a/docs/topics/cli-run.adoc +++ b/docs/topics/cli-run.adoc @@ -11,11 +11,11 @@ You can run {ProductShortName} against your application. .Procedure . Open a terminal and navigate to the `<{ProductShortName}_HOME>/bin/` directory. -. Execute the `windup-cli` script, or `windup-cli.bat` for Windows, and specify the appropriate arguments: +. Execute the `{mta-cli}` script, or `{mta-cli}.bat` for Windows, and specify the appropriate arguments: + [source,terminal,subs="attributes+"] ---- -$ ./windup-cli --input /path/to/jee-example-app-1.0.0.ear \ +$ ./{mta-cli} --input /path/to/jee-example-app-1.0.0.ear \ --output /path/to/output --source weblogic --target eap:6 \ --packages com.acme org.apache ---- @@ -38,7 +38,7 @@ The following command analyzes the `com.acme` and `org.apache` packages of the l [source,terminal,subs="attributes+"] ---- -$ <{ProductShortName}_HOME>/bin/windup-cli \ +$ <{ProductShortName}_HOME>/bin/{mta-cli} \ --input /path/to/jee-example-app-1.0.0.ear \ --output /path/to/report-output/ --source eap:5 --target eap:7 \ --packages com.acme org.apache @@ -52,7 +52,7 @@ The following command analyzes the `org.jboss.seam` packages of the link:https:/ [source,terminal,subs="attributes+"] ---- -$ <{ProductShortName}_HOME>/bin/windup-cli --sourceMode --input /path/to/seam-booking-5.2/ \ +$ <{ProductShortName}_HOME>/bin/{mta-cli} --sourceMode --input /path/to/seam-booking-5.2/ \ --output /path/to/report-output/ --target eap:6 --packages org.jboss.seam ---- [] @@ -63,7 +63,7 @@ The following command analyzes the `com.acme` and `org.apache` packages of the l [source,terminal,subs="attributes+"] ---- -$ <{ProductShortName}_HOME>/bin/windup-cli --input /path/to/jee-example-app-1.0.0.ear \ +$ <{ProductShortName}_HOME>/bin/{mta-cli} --input /path/to/jee-example-app-1.0.0.ear \ --output /path/to/report-output/ \ --target eap:7 --target cloud-readiness --packages com.acme org.apache ---- @@ -76,7 +76,7 @@ To override the default _Fernflower_ decompiler, pass the `-Dwindup.decompiler` [source,terminal,subs="attributes+"] ---- -$ <{ProductShortName}_HOME>/bin/windup-cli -Dwindup.decompiler=procyon \ +$ <{ProductShortName}_HOME>/bin/{mta-cli} -Dwindup.decompiler=procyon \ --input --output \ --target --packages ---- @@ -88,7 +88,7 @@ The {ProductShortName} {CLIName} provides an option to enable Bash completion fo [source,terminal,subs="attributes+"] ---- -$ <{ProductShortName}_HOME>/bin/windup-cli [TAB] +$ <{ProductShortName}_HOME>/bin/{mta-cli} [TAB] ---- [discrete] @@ -99,7 +99,7 @@ To enable Bash completion for the current shell, execute the following command: [source,terminal,subs="attributes+"] ---- -$ source <{ProductShortName}_HOME>/bash-completion/windup-cli +$ source <{ProductShortName}_HOME>/bash-completion/{mta-cli} ---- [discrete] @@ -112,22 +112,22 @@ The following commands allow Bash completion to persist across restarts: + [source,terminal,subs="attributes+"] ---- -source <{ProductShortName}_HOME>/bash-completion/windup-cli +source <{ProductShortName}_HOME>/bash-completion/{mta-cli} ---- * To enable Bash completion for all users across system restarts, copy the {ProductName} {CLIName} Bash completion file to the `/etc/bash_completion.d/` directory as the root user. + [source,terminal,subs="attributes+"] ---- -# cp <{ProductShortName}_HOME>/bash-completion/windup-cli /etc/bash_completion.d/ +# cp <{ProductShortName}_HOME>/bash-completion/{mta-cli} /etc/bash_completion.d/ ---- [id="accessing-help_{context}"] == Accessing {ProductShortName} help -To see the complete list of available arguments for the `windup-cli` command, open a terminal, navigate to the `<{ProductShortName}_HOME>` directory, and execute the following command: +To see the complete list of available arguments for the `{mta-cli}` command, open a terminal, navigate to the `<{ProductShortName}_HOME>` directory, and execute the following command: [source,terminal,subs="attributes+"] ---- -$ <{ProductShortName}_HOME>/bin/windup-cli --help +$ <{ProductShortName}_HOME>/bin/{mta-cli} --help ---- diff --git a/docs/topics/create-first-xml-rule.adoc b/docs/topics/create-first-xml-rule.adoc index ebad527be8..b66f0dbdee 100644 --- a/docs/topics/create-first-xml-rule.adoc +++ b/docs/topics/create-first-xml-rule.adoc @@ -213,7 +213,7 @@ Open a terminal and run the following command, passing the test file as an input [options="nowrap",subs="attributes+"] ---- -$ <{ProductShortName}_HOME>/bin/windup-cli --sourceMode --input /home//migration-rules/data --output /home//migration-rules/reports --target eap:6 +$ <{ProductShortName}_HOME>/bin/{mta-cli} --sourceMode --input /home//migration-rules/data --output /home//migration-rules/reports --target eap:6 ---- You should see the following result. diff --git a/docs/topics/intellij-idea-plugin-run-configuration.adoc b/docs/topics/intellij-idea-plugin-run-configuration.adoc index d55317f083..d8da21b5b6 100644 --- a/docs/topics/intellij-idea-plugin-run-configuration.adoc +++ b/docs/topics/intellij-idea-plugin-run-configuration.adoc @@ -20,7 +20,7 @@ The run configuration panel is displayed on the right. . Complete the following configuration fields: -** *cli*: Enter the path to the cli executable. For example: `$HOME/{LC_PSN}-cli-{ProductDistributionVersion}/bin/windup-cli`. +** *cli*: Enter the path to the cli executable. For example: `$HOME/{LC_PSN}-cli-{ProductDistributionVersion}/bin/{mta-cli}`. ** *Input*: Click *Add* and enter the input file or directory. ** *Target*: Select one or more target migration paths. + diff --git a/docs/topics/manually-test-rules.adoc b/docs/topics/manually-test-rules.adoc index 64a13377e1..b9e53d18bc 100644 --- a/docs/topics/manually-test-rules.adoc +++ b/docs/topics/manually-test-rules.adoc @@ -10,7 +10,7 @@ You can run an XML rule against your application file to test it: [source,terminal,subs="attributes+"] ---- -$ <{ProductShortName}_HOME>/bin/windup-cli [--sourceMode] --input --output --target --packages +$ <{ProductShortName}_HOME>/bin/{mta-cli} [--sourceMode] --input --output --target --packages ---- You should see the following result: diff --git a/docs/topics/mavenize.adoc b/docs/topics/mavenize.adoc index d5d3d63e04..be48c30d14 100644 --- a/docs/topics/mavenize.adoc +++ b/docs/topics/mavenize.adoc @@ -18,7 +18,7 @@ The following example runs {ProductShortName} using the link:https://github.com/ [source,options="nowrap",subs="attributes+"] ---- -$ <{ProductShortName}_HOME>/bin/windup-cli --input /path/to/jee-example-app-1.0.0.ear --output /path/to/output --target eap:6 --packages com.acme org.apache --mavenize +$ <{ProductShortName}_HOME>/bin/{mta-cli} --input /path/to/jee-example-app-1.0.0.ear --output /path/to/output --target eap:6 --packages com.acme org.apache --mavenize ---- This generates the Maven project structure in the `/path/to/output/mavenized` directory. diff --git a/docs/topics/review-reports.adoc b/docs/topics/review-reports.adoc index 7252d0efe1..af34c232bd 100644 --- a/docs/topics/review-reports.adoc +++ b/docs/topics/review-reports.adoc @@ -13,7 +13,7 @@ The report was generated using the following command. [options="nowrap",subs="attributes+"] ---- -$ <{ProductShortName}_HOME>/bin/windup-cli --input /home/username/windup-cli-source/test-files/jee-example-app-1.0.0.ear/ --output /home/username/windup-cli-reports/jee-example-app-1.0.0.ear-report --target eap:6 --packages com.acme org.apache +$ <{ProductShortName}_HOME>/bin/{mta-cli} --input /home/username/{mta-cli}-source/test-files/jee-example-app-1.0.0.ear/ --output /home/username/{mta-cli}-reports/jee-example-app-1.0.0.ear-report --target eap:6 --packages com.acme org.apache ---- endif::cli-guide[] diff --git a/docs/topics/templates/document-attributes.adoc b/docs/topics/templates/document-attributes.adoc index 92a55e7d09..da21baa606 100644 --- a/docs/topics/templates/document-attributes.adoc +++ b/docs/topics/templates/document-attributes.adoc @@ -17,6 +17,7 @@ ifdef::mta[] :ProductShortName: MTA :ProductFullName: Migration Toolkit for Applications (MTA) :LC_PSN: mta +:mta-cli: mta-cli :DocInfoProductNameURL: migration_toolkit_for_applications :WebName: user interface :WebNameTitle: User Interface @@ -40,6 +41,7 @@ ifdef::mtr[] :ProductShortName: MTR :ProductFullName: Migration Toolkit for Runtimes (MTR) :LC_PSN: mtr +:mta-cli: windup-cli :DocInfoProductNameURL: migration_toolkit_for_runtimes :WebName: web console :WebNameTitle: Web Console diff --git a/docs/topics/using-openrewrite-recipes.adoc b/docs/topics/using-openrewrite-recipes.adoc index c6ae191457..7e15c2e6e6 100644 --- a/docs/topics/using-openrewrite-recipes.adoc +++ b/docs/topics/using-openrewrite-recipes.adoc @@ -18,11 +18,11 @@ For example, the OpenRewrite recipe `org.jboss.windup.JavaxToJakarta` renames im .Procedure -. Run `windup-cli`, specifying the recipe name, the path to the configuration file, and the application: +. Run `{mta-cli}`, specifying the recipe name, the path to the configuration file, and the application: + [source,terminal,subs="attributes+"] ---- -$ ./windup-cli --openrewrite --input \ +$ ./{mta-cli} --openrewrite --input \ "-Drewrite.configLocation=" \ "-DactiveRecipes=" --goal dryRun ---- @@ -49,11 +49,11 @@ You can include more than one recipe by specifying each in the `activeRecipes` p ** `dryRun` : The script returns a list of proposed changes. Ignore the `"Run 'mvn rewrite:run' to apply the recipes"` message. ** `run`: The script applies the changes. -. Run `windup-cli` with `--goal run` to apply the recipe: +. Run `{mta-cli}` with `--goal run` to apply the recipe: + [source,terminal,subs="attributes+"] ---- -$ ./windup-cli --openrewrite --input \ +$ ./{mta-cli} --openrewrite --input \ "-Drewrite.configLocation=" \ "-DactiveRecipes=" --goal run ----- \ No newline at end of file +---- diff --git a/docs/topics/vs-code-extension-run-configuration.adoc b/docs/topics/vs-code-extension-run-configuration.adoc index 699367d22b..009a1a1187 100644 --- a/docs/topics/vs-code-extension-run-configuration.adoc +++ b/docs/topics/vs-code-extension-run-configuration.adoc @@ -10,7 +10,7 @@ You can configure multiple run configurations to run against each project you im .Prerequisites -* `windup-cli` executable installed. You can download the `windup-cli` executable from link:{DevDownloadPageURL}[{LC_PSN} download]. +* `{mta-cli}` executable installed. You can download the `{mta-cli}` executable from link:{DevDownloadPageURL}[{LC_PSN} download]. .Procedure @@ -19,7 +19,7 @@ You can configure multiple run configurations to run against each project you im . Complete the following configuration fields: ** *Name*: Enter a meaningful name for the analysis configuration or accept the default. -** *cli*: Enter the path to the cli executable. For example: `$HOME/{LC_PSN}-cli-{ProductDistributionVersion}/bin/windup-cli`. +** *cli*: Enter the path to the cli executable. For example: `$HOME/{LC_PSN}-cli-{ProductDistributionVersion}/bin/{mta-cli}`. ** *Input*: Set to the path of the project that you have open within your IDE by clicking *Add* and doing one of the following: *** Enter the input file or directory and press Enter. From 79bfa5c9715c882f933f473404a52a75d6b52ad5 Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Tue, 6 Feb 2024 15:19:18 +0200 Subject: [PATCH 2/2] additional corections to cli-guiderun.adoc and using-openwrite-recipes.adoc --- docs/topics/available-openrewrite-recipes.adoc | 11 ++++++----- docs/topics/cli-run.adoc | 13 +------------ docs/topics/using-openrewrite-recipes.adoc | 4 ++-- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/docs/topics/available-openrewrite-recipes.adoc b/docs/topics/available-openrewrite-recipes.adoc index b1b58d8916..b1832efe33 100644 --- a/docs/topics/available-openrewrite-recipes.adoc +++ b/docs/topics/available-openrewrite-recipes.adoc @@ -1,6 +1,7 @@ // Module included in the following module: // // * docs/cli-guide-mtr/master.adoc +// * docs/cli-guide/master.adoc [id=available-openrewrite-recipes_{context}] = Available OpenRewrite recipes @@ -18,21 +19,21 @@ Replace `javax` artifacts, declared within `pom.xml` files, with the `jakarta` equivalents -|`/rules/openrewrite/jakarta \ /javax/imports/rewrite.yml` +|`<{ProductShortName}_HOME>/rules/openrewrite/jakarta \ /javax/imports/rewrite.yml` |`org.jboss.windup.JavaxToJakarta` |Java EE to Jakarta EE |Rename bootstrapping files -|`/rules/openrewrite/jakarta \ /javax/bootstrapping/rewrite.yml` +|`<{ProductShortName}_HOME>/rules/openrewrite/jakarta \ /javax/bootstrapping/rewrite.yml` |`org.jboss.windup.jakarta.javax. \ BootstrappingFiles` |Java EE to Jakarta EE |Transform `persistence.xml` configuration -|`/rules/openrewrite/jakarta \ /javax/xml/rewrite.yml` +|`<{ProductShortName}_HOME>/rules/openrewrite/jakarta \ /javax/xml/rewrite.yml` |`org.jboss.windup.javax-jakarta. \ PersistenceXML` |Spring Boot to Quarkus |Replace `spring.jpa.hibernate.ddl-auto` property within files matching `application*.properties` -|`/rules/openrewrite/quarkus \ /springboot/properties/rewrite.yml` +|`<{ProductShortName}_HOME>/rules/openrewrite/quarkus \ /springboot/properties/rewrite.yml` |`org.jboss.windup.sb-quarkus.Properties` -|==== \ No newline at end of file +|==== diff --git a/docs/topics/cli-run.adoc b/docs/topics/cli-run.adoc index 87f7f6588a..17d4c78bca 100644 --- a/docs/topics/cli-run.adoc +++ b/docs/topics/cli-run.adoc @@ -11,7 +11,7 @@ You can run {ProductShortName} against your application. .Procedure . Open a terminal and navigate to the `<{ProductShortName}_HOME>/bin/` directory. -. Execute the `{mta-cli}` script, or `{mta-cli}.bat` for Windows, and specify the appropriate arguments: +. Execute the `{mta-cli}` script, or `{mta-cli}.exe` for Windows, and specify the appropriate arguments: + [source,terminal,subs="attributes+"] ---- @@ -70,17 +70,6 @@ $ <{ProductShortName}_HOME>/bin/{mta-cli} --input /path/to/jee-example-app-1.0.0 [] [discrete] -=== Overriding {ProductShortName} properties - -To override the default _Fernflower_ decompiler, pass the `-Dwindup.decompiler` argument on the command line. For example, to use the _Procyon_ decompiler, use the following syntax: - -[source,terminal,subs="attributes+"] ----- -$ <{ProductShortName}_HOME>/bin/{mta-cli} -Dwindup.decompiler=procyon \ - --input --output \ - --target --packages ----- - [id="cli-bash-completion_{context}"] == {ProductShortName} {CLINameTitle} Bash completion diff --git a/docs/topics/using-openrewrite-recipes.adoc b/docs/topics/using-openrewrite-recipes.adoc index 7e15c2e6e6..0b019bafdb 100644 --- a/docs/topics/using-openrewrite-recipes.adoc +++ b/docs/topics/using-openrewrite-recipes.adoc @@ -22,7 +22,7 @@ For example, the OpenRewrite recipe `org.jboss.windup.JavaxToJakarta` renames im + [source,terminal,subs="attributes+"] ---- -$ ./{mta-cli} --openrewrite --input \ +$ ./{mta-cli} transform openrewrite --input \ "-Drewrite.configLocation=" \ "-DactiveRecipes=" --goal dryRun ---- @@ -53,7 +53,7 @@ You can include more than one recipe by specifying each in the `activeRecipes` p + [source,terminal,subs="attributes+"] ---- -$ ./{mta-cli} --openrewrite --input \ +$ ./{mta-cli} transform openrewrite --input \ "-Drewrite.configLocation=" \ "-DactiveRecipes=" --goal run ----