From 910610a4f7ad8d13ba70d38fb05ad86b5c43d05b Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Thu, 21 Dec 2023 23:12:11 +0200 Subject: [PATCH 01/13] adding new mta cli command modules --- docs/cli-guide/master.adoc | 6 ++ docs/topics/mta-cli-analyze.adoc | 71 ++++++++++++++++++++++ docs/topics/mta-cli-transform.adoc | 97 ++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+) create mode 100644 docs/topics/mta-cli-analyze.adoc create mode 100644 docs/topics/mta-cli-transform.adoc diff --git a/docs/cli-guide/master.adoc b/docs/cli-guide/master.adoc index 1457a80fb21..fcbb1a21f21 100644 --- a/docs/cli-guide/master.adoc +++ b/docs/cli-guide/master.adoc @@ -33,6 +33,12 @@ include::topics/installing-web-console-or-cli-tool.adoc[leveloffset=+2] // Run the CLI include::topics/cli-run.adoc[leveloffset=+2] +// Analyze application source code +include::topics/mta-cli-analyze.adoc[leveloffset=+3] + +// Transform XML rules to YAML +include::topics/mta-cli-transform.adoc[leveloffset=+3] + // Use OpenRewrite recipes include::topics/using-openrewrite-recipes.adoc[leveloffset=+3] diff --git a/docs/topics/mta-cli-analyze.adoc b/docs/topics/mta-cli-analyze.adoc new file mode 100644 index 00000000000..063da110425 --- /dev/null +++ b/docs/topics/mta-cli-analyze.adoc @@ -0,0 +1,71 @@ +// Module included in the following assemblies: +// +// * docs/cli-guide/master.adoc + +:_content-type: CONCEPT +[id="mta-cli-analyze_{context}"] += Performing analysis using the command line + +`Analyze` allows running source code and binary analysis using `analyzer-lsp`. + +To run analysis on application source code, run: + +[source,terminal,subs="attributes+"] +---- +windup-cli analyze --input= --output= +---- + +All flags: + +[source,terminal,subs="attributes+"] +---- +Analyze application source code + +Usage: + windup-cli analyze [flags] + +Flags: + --analyze-known-libraries analyze known open-source libraries + -h, --help help for analyze + -i, --input string path to application source code or a binary + --json-output create analysis and dependency output as json + --list-sources list rules for available migration sources + --list-targets list rules for available migration targets + -m, --mode string analysis mode. Must be one of 'full' or 'source-only' (default "full") + -o, --output string path to the directory for analysis output + --rules stringArray filename or directory containing rule files + --skip-static-report do not generate static report + -s, --source stringArray source technology to consider for analysis + -t, --target stringArray target technology to consider for analysis + +Global Flags: + --log-level int log level (default 5) +---- +.Usage example + +. Get an example application to run analysis on +. List available target technologies +[source,terminal,subs="attributes+"] +---- +windup-cli analyze --list-targets +---- +. Run an analysis with a specified target technology +[source,terminal,subs="attributes+"] +---- +windup-cli analyze --input= --output= --target=cloud-readiness +---- +. Several analysis reports are created in your specified output path: +[source,terminal,subs="attributes+"] + +---- +$ ls ./output/ -1 +analysis.log +dependencies.yaml +dependency.log +output.yaml +static-report +---- + +`output.yaml` is the file that contains the issues report. +`static-report` contains the static HTML report. +`dependencies.yaml`contains a dependencies report. diff --git a/docs/topics/mta-cli-transform.adoc b/docs/topics/mta-cli-transform.adoc new file mode 100644 index 00000000000..8d56eb7862e --- /dev/null +++ b/docs/topics/mta-cli-transform.adoc @@ -0,0 +1,97 @@ +// Module included in the following assemblies: +// +// * docs/cli-guide/master.adoc + +:_content-type: CONCEPT +[id="mta-cli-transform_{context}"] += Performing transformation using the command line + +Transform has two sub commands - `openrewrite` and `rules`. + +[source,terminal,subs="attributes+"] +---- +Transform application source code or windup XML rules + +Usage: + windup-cli transform [flags] + windup-cli transform [command] + +Available Commands: + openrewrite Transform application source code using OpenRewrite recipes + rules Convert XML rules to YAML + +Flags: + -h, --help help for transform + +Global Flags: + --log-level int log level (default 5) + +Use "windup-cli transform [command] --help" for more information about a command. +---- + +`OpenRewrite` + +The `openrewrite` sub command allows running `OpenRewrite` recipes on source code. + +[source,terminal,subs="attributes+"] +---- +Transform application source code using OpenRewrite recipes + +Usage: + windup-cli transform openrewrite [flags] + +Flags: + -g, --goal string target goal (default "dryRun") + -h, --help help for openrewrite + -i, --input string path to application source code directory + -l, --list-targets list all available OpenRewrite recipes + -t, --target string target openrewrite recipe to use. Run --list-targets to get a list of packaged recipes. + +Global Flags: + --log-level int log level (default 5) +---- + +To run `transform openrewrite` on application source code, run: + +[source,terminal,subs="attributes+"] +---- +windup-cli transform openrewrite --input= --target= +---- + +`Rules` + +The `rules` sub command allows converting Windup XML rules to analyzer-lsp YAML rules using `windup-shim`. + +---- +Convert XML rules to YAML + +Usage: + windup-cli transform rules [flags] + +Flags: + -h, --help help for rules + -i, --input stringArray path to XML rule file(s) or directory + -o, --output string path to output directory + +Global Flags: + --log-level int log level (default 5) +---- + +To run `transform rules` on application source code, run: +---- +windup-cli transform rules --input= --output= +---- + +.Usage example +. Get an example application to transform source code +. View the available OpenRewrite recipes +[source,terminal,subs="attributes+"] +---- +windup-cli transform openrewrite --list-targets +---- +. Run a recipe on the example application +[source,terminal,subs="attributes+"] +---- +windup-cli transform openrewrite --input= --target=jakarta-imports +---- +- Inspect the `jakartaee-duke` application source code diff to see the transformation From 80f1a4425eda2d398fc4f49d43d4731e0d1022b1 Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Wed, 3 Jan 2024 16:03:03 +0200 Subject: [PATCH 02/13] update to cli analyze command module --- docs/topics/mta-cli-analyze.adoc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/topics/mta-cli-analyze.adoc b/docs/topics/mta-cli-analyze.adoc index 063da110425..2b5db6fe223 100644 --- a/docs/topics/mta-cli-analyze.adoc +++ b/docs/topics/mta-cli-analyze.adoc @@ -31,6 +31,10 @@ Flags: --json-output create analysis and dependency output as json --list-sources list rules for available migration sources --list-targets list rules for available migration targets + -l, --label-selector string run rules based on specified label selector expression + --maven-settings string path to a custom maven settings file to use + --overwrite overwrite output directory + --skip-static-report do not generate static report -m, --mode string analysis mode. Must be one of 'full' or 'source-only' (default "full") -o, --output string path to the directory for analysis output --rules stringArray filename or directory containing rule files @@ -68,4 +72,4 @@ static-report `output.yaml` is the file that contains the issues report. `static-report` contains the static HTML report. -`dependencies.yaml`contains a dependencies report. +`dependencies.yaml` contains a dependencies report. From c4b02704ea0210b2f162f497e5aeed6876726f64 Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Wed, 3 Jan 2024 16:59:31 +0200 Subject: [PATCH 03/13] update to cli transform command module, add new attribute cli-cmd --- docs/topics/mta-cli-transform.adoc | 3 ++- docs/topics/templates/document-attributes.adoc | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/topics/mta-cli-transform.adoc b/docs/topics/mta-cli-transform.adoc index 8d56eb7862e..c84fedc26de 100644 --- a/docs/topics/mta-cli-transform.adoc +++ b/docs/topics/mta-cli-transform.adoc @@ -24,7 +24,8 @@ Flags: -h, --help help for transform Global Flags: - --log-level int log level (default 5) + --log-level uint32 log level (default 4) + --no-cleanup do not cleanup temporary resources Use "windup-cli transform [command] --help" for more information about a command. ---- diff --git a/docs/topics/templates/document-attributes.adoc b/docs/topics/templates/document-attributes.adoc index 5edc923d7a9..b66fe32cc51 100644 --- a/docs/topics/templates/document-attributes.adoc +++ b/docs/topics/templates/document-attributes.adoc @@ -60,6 +60,7 @@ endif::[] // ******************* :CLIName: CLI :CLINameTitle: CLI +:cli-cmd: windup-cli :MavenName: Maven plugin :MavenNameTitle: Maven Plugin From 365d4c48256ad179c57e2892f4bcb4667c314507 Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Wed, 3 Jan 2024 17:24:22 +0200 Subject: [PATCH 04/13] add new attribute cli-cmd to new modules --- docs/topics/mta-cli-analyze.adoc | 8 ++++---- docs/topics/mta-cli-transform.adoc | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/topics/mta-cli-analyze.adoc b/docs/topics/mta-cli-analyze.adoc index 2b5db6fe223..b882e75dd6a 100644 --- a/docs/topics/mta-cli-analyze.adoc +++ b/docs/topics/mta-cli-analyze.adoc @@ -12,7 +12,7 @@ To run analysis on application source code, run: [source,terminal,subs="attributes+"] ---- -windup-cli analyze --input= --output= +{cli-cmd} analyze --input= --output= ---- All flags: @@ -22,7 +22,7 @@ All flags: Analyze application source code Usage: - windup-cli analyze [flags] + {cli-cmd} analyze [flags] Flags: --analyze-known-libraries analyze known open-source libraries @@ -51,12 +51,12 @@ Global Flags: . List available target technologies [source,terminal,subs="attributes+"] ---- -windup-cli analyze --list-targets +{cli-cmd} analyze --list-targets ---- . Run an analysis with a specified target technology [source,terminal,subs="attributes+"] ---- -windup-cli analyze --input= --output= --target=cloud-readiness +{cli-cmd} analyze --input= --output= --target=cloud-readiness ---- . Several analysis reports are created in your specified output path: [source,terminal,subs="attributes+"] diff --git a/docs/topics/mta-cli-transform.adoc b/docs/topics/mta-cli-transform.adoc index c84fedc26de..b6c056b6454 100644 --- a/docs/topics/mta-cli-transform.adoc +++ b/docs/topics/mta-cli-transform.adoc @@ -13,8 +13,8 @@ Transform has two sub commands - `openrewrite` and `rules`. Transform application source code or windup XML rules Usage: - windup-cli transform [flags] - windup-cli transform [command] + {cli-cmd} transform [flags] + {cli-cmd} transform [command] Available Commands: openrewrite Transform application source code using OpenRewrite recipes @@ -27,7 +27,7 @@ Global Flags: --log-level uint32 log level (default 4) --no-cleanup do not cleanup temporary resources -Use "windup-cli transform [command] --help" for more information about a command. +Use "{cli-cmd} transform [command] --help" for more information about a command. ---- `OpenRewrite` @@ -39,7 +39,7 @@ The `openrewrite` sub command allows running `OpenRewrite` recipes on source cod Transform application source code using OpenRewrite recipes Usage: - windup-cli transform openrewrite [flags] + {cli-cmd} transform openrewrite [flags] Flags: -g, --goal string target goal (default "dryRun") @@ -56,7 +56,7 @@ To run `transform openrewrite` on application source code, run: [source,terminal,subs="attributes+"] ---- -windup-cli transform openrewrite --input= --target= +{cli-cmd} transform openrewrite --input= --target= ---- `Rules` @@ -67,7 +67,7 @@ The `rules` sub command allows converting Windup XML rules to analyzer-lsp YAML Convert XML rules to YAML Usage: - windup-cli transform rules [flags] + {cli-cmd} transform rules [flags] Flags: -h, --help help for rules @@ -80,7 +80,7 @@ Global Flags: To run `transform rules` on application source code, run: ---- -windup-cli transform rules --input= --output= +{cli-cmd} transform rules --input= --output= ---- .Usage example @@ -88,11 +88,11 @@ windup-cli transform rules --input= --output= --target=jakarta-imports +{cli-cmd} transform openrewrite --input= --target=jakarta-imports ---- - Inspect the `jakartaee-duke` application source code diff to see the transformation From 8a706e44093897be6f5b54b55abd73a2b420cf9e Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Wed, 3 Jan 2024 17:32:41 +0200 Subject: [PATCH 05/13] update global flags --- docs/topics/mta-cli-analyze.adoc | 3 ++- docs/topics/mta-cli-transform.adoc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/topics/mta-cli-analyze.adoc b/docs/topics/mta-cli-analyze.adoc index b882e75dd6a..d7f4b2b6117 100644 --- a/docs/topics/mta-cli-analyze.adoc +++ b/docs/topics/mta-cli-analyze.adoc @@ -43,7 +43,8 @@ Flags: -t, --target stringArray target technology to consider for analysis Global Flags: - --log-level int log level (default 5) + --log-level uint32 log level (default 4) + --no-cleanup do not cleanup temporary resources ---- .Usage example diff --git a/docs/topics/mta-cli-transform.adoc b/docs/topics/mta-cli-transform.adoc index b6c056b6454..51f7551358a 100644 --- a/docs/topics/mta-cli-transform.adoc +++ b/docs/topics/mta-cli-transform.adoc @@ -49,7 +49,8 @@ Flags: -t, --target string target openrewrite recipe to use. Run --list-targets to get a list of packaged recipes. Global Flags: - --log-level int log level (default 5) + --log-level uint32 log level (default 4) + --no-cleanup do not cleanup temporary resources ---- To run `transform openrewrite` on application source code, run: From 531a662f287fbe3c58556ecc0171e55ad71f0c3b Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Wed, 3 Jan 2024 21:54:32 +0200 Subject: [PATCH 06/13] update mta-cli attribute --- docs/topics/mta-cli-analyze.adoc | 8 ++++---- docs/topics/mta-cli-transform.adoc | 18 +++++++++--------- docs/topics/templates/document-attributes.adoc | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/topics/mta-cli-analyze.adoc b/docs/topics/mta-cli-analyze.adoc index d7f4b2b6117..e70e821a276 100644 --- a/docs/topics/mta-cli-analyze.adoc +++ b/docs/topics/mta-cli-analyze.adoc @@ -12,7 +12,7 @@ To run analysis on application source code, run: [source,terminal,subs="attributes+"] ---- -{cli-cmd} analyze --input= --output= +{mta-cli} analyze --input= --output= ---- All flags: @@ -22,7 +22,7 @@ All flags: Analyze application source code Usage: - {cli-cmd} analyze [flags] + {mta-cli} analyze [flags] Flags: --analyze-known-libraries analyze known open-source libraries @@ -52,12 +52,12 @@ Global Flags: . List available target technologies [source,terminal,subs="attributes+"] ---- -{cli-cmd} analyze --list-targets +{mta-cli} analyze --list-targets ---- . Run an analysis with a specified target technology [source,terminal,subs="attributes+"] ---- -{cli-cmd} analyze --input= --output= --target=cloud-readiness +{mta-cli} analyze --input= --output= --target=cloud-readiness ---- . Several analysis reports are created in your specified output path: [source,terminal,subs="attributes+"] diff --git a/docs/topics/mta-cli-transform.adoc b/docs/topics/mta-cli-transform.adoc index 51f7551358a..2e8cb740bef 100644 --- a/docs/topics/mta-cli-transform.adoc +++ b/docs/topics/mta-cli-transform.adoc @@ -13,8 +13,8 @@ Transform has two sub commands - `openrewrite` and `rules`. Transform application source code or windup XML rules Usage: - {cli-cmd} transform [flags] - {cli-cmd} transform [command] + {mta-cli} transform [flags] + {mta-cli} transform [command] Available Commands: openrewrite Transform application source code using OpenRewrite recipes @@ -27,7 +27,7 @@ Global Flags: --log-level uint32 log level (default 4) --no-cleanup do not cleanup temporary resources -Use "{cli-cmd} transform [command] --help" for more information about a command. +Use "{mta-cli} transform [command] --help" for more information about a command. ---- `OpenRewrite` @@ -39,7 +39,7 @@ The `openrewrite` sub command allows running `OpenRewrite` recipes on source cod Transform application source code using OpenRewrite recipes Usage: - {cli-cmd} transform openrewrite [flags] + {mta-cli} transform openrewrite [flags] Flags: -g, --goal string target goal (default "dryRun") @@ -57,7 +57,7 @@ To run `transform openrewrite` on application source code, run: [source,terminal,subs="attributes+"] ---- -{cli-cmd} transform openrewrite --input= --target= +{mta-cli} transform openrewrite --input= --target= ---- `Rules` @@ -68,7 +68,7 @@ The `rules` sub command allows converting Windup XML rules to analyzer-lsp YAML Convert XML rules to YAML Usage: - {cli-cmd} transform rules [flags] + {mta-cli} transform rules [flags] Flags: -h, --help help for rules @@ -81,7 +81,7 @@ Global Flags: To run `transform rules` on application source code, run: ---- -{cli-cmd} transform rules --input= --output= +{mta-cli} transform rules --input= --output= ---- .Usage example @@ -89,11 +89,11 @@ To run `transform rules` on application source code, run: . View the available OpenRewrite recipes [source,terminal,subs="attributes+"] ---- -{cli-cmd} transform openrewrite --list-targets +{mta-cli} transform openrewrite --list-targets ---- . Run a recipe on the example application [source,terminal,subs="attributes+"] ---- -{cli-cmd} transform openrewrite --input= --target=jakarta-imports +{mta-cli} transform openrewrite --input= --target=jakarta-imports ---- - Inspect the `jakartaee-duke` application source code diff to see the transformation diff --git a/docs/topics/templates/document-attributes.adoc b/docs/topics/templates/document-attributes.adoc index b66fe32cc51..04fc219dd56 100644 --- a/docs/topics/templates/document-attributes.adoc +++ b/docs/topics/templates/document-attributes.adoc @@ -60,7 +60,7 @@ endif::[] // ******************* :CLIName: CLI :CLINameTitle: CLI -:cli-cmd: windup-cli +:mta-cli: mta-cli :MavenName: Maven plugin :MavenNameTitle: Maven Plugin From 3d7db1ec03f6c045b4604accde58b661a47ceaf1 Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Mon, 8 Jan 2024 19:29:16 +0200 Subject: [PATCH 07/13] substitute attribute LC_PSN for windup --- docs/topics/mta-cli-transform.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/mta-cli-transform.adoc b/docs/topics/mta-cli-transform.adoc index 2e8cb740bef..a174d7e0f41 100644 --- a/docs/topics/mta-cli-transform.adoc +++ b/docs/topics/mta-cli-transform.adoc @@ -10,7 +10,7 @@ Transform has two sub commands - `openrewrite` and `rules`. [source,terminal,subs="attributes+"] ---- -Transform application source code or windup XML rules +Transform application source code or {LC_PSN} XML rules Usage: {mta-cli} transform [flags] From 97fdde50b84a3d809fd9eb1dfd635b33fc4461f3 Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Tue, 9 Jan 2024 19:24:30 +0200 Subject: [PATCH 08/13] updates to mta-cli commands --- docs/topics/mta-cli-analyze.adoc | 13 +++++++++---- docs/topics/mta-cli-transform.adoc | 18 ++++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/docs/topics/mta-cli-analyze.adoc b/docs/topics/mta-cli-analyze.adoc index e70e821a276..472e84df7df 100644 --- a/docs/topics/mta-cli-analyze.adoc +++ b/docs/topics/mta-cli-analyze.adoc @@ -8,7 +8,7 @@ `Analyze` allows running source code and binary analysis using `analyzer-lsp`. -To run analysis on application source code, run: +To run analysis on application source code, run the following command: [source,terminal,subs="attributes+"] ---- @@ -48,18 +48,21 @@ Global Flags: ---- .Usage example -. Get an example application to run analysis on -. List available target technologies +. Get an example application to run analysis on. +. List available target technologies. ++ [source,terminal,subs="attributes+"] ---- {mta-cli} analyze --list-targets ---- -. Run an analysis with a specified target technology +. Run an analysis with a specified target technology. ++ [source,terminal,subs="attributes+"] ---- {mta-cli} analyze --input= --output= --target=cloud-readiness ---- . Several analysis reports are created in your specified output path: ++ [source,terminal,subs="attributes+"] ---- @@ -72,5 +75,7 @@ static-report ---- `output.yaml` is the file that contains the issues report. + `static-report` contains the static HTML report. + `dependencies.yaml` contains a dependencies report. diff --git a/docs/topics/mta-cli-transform.adoc b/docs/topics/mta-cli-transform.adoc index a174d7e0f41..3cc9ecfc232 100644 --- a/docs/topics/mta-cli-transform.adoc +++ b/docs/topics/mta-cli-transform.adoc @@ -30,7 +30,7 @@ Global Flags: Use "{mta-cli} transform [command] --help" for more information about a command. ---- -`OpenRewrite` +.OpenRewrite The `openrewrite` sub command allows running `OpenRewrite` recipes on source code. @@ -53,16 +53,16 @@ Global Flags: --no-cleanup do not cleanup temporary resources ---- -To run `transform openrewrite` on application source code, run: - +To run `transform openrewrite` on application source code, run the following command: ++ [source,terminal,subs="attributes+"] ---- {mta-cli} transform openrewrite --input= --target= ---- -`Rules` +.Rules -The `rules` sub command allows converting Windup XML rules to analyzer-lsp YAML rules using `windup-shim`. +The `rules` sub command allows converting {LC_PSN} XML rules to analyzer-lsp YAML rules using `windup-shim`. ---- Convert XML rules to YAML @@ -85,13 +85,15 @@ To run `transform rules` on application source code, run: ---- .Usage example -. Get an example application to transform source code -. View the available OpenRewrite recipes +. Get an example application to transform source code. +. View the available OpenRewrite recipes. ++ [source,terminal,subs="attributes+"] ---- {mta-cli} transform openrewrite --list-targets ---- -. Run a recipe on the example application +. Run a recipe on the example application. ++ [source,terminal,subs="attributes+"] ---- {mta-cli} transform openrewrite --input= --target=jakarta-imports From bdc569cfcf43ee0a89d70f6493052009e4a83900 Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Tue, 9 Jan 2024 19:37:02 +0200 Subject: [PATCH 09/13] update to commands --- docs/topics/mta-cli-transform.adoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/topics/mta-cli-transform.adoc b/docs/topics/mta-cli-transform.adoc index 3cc9ecfc232..b4cb033c08e 100644 --- a/docs/topics/mta-cli-transform.adoc +++ b/docs/topics/mta-cli-transform.adoc @@ -33,7 +33,7 @@ Use "{mta-cli} transform [command] --help" for more information about a command. .OpenRewrite The `openrewrite` sub command allows running `OpenRewrite` recipes on source code. - ++ [source,terminal,subs="attributes+"] ---- Transform application source code using OpenRewrite recipes @@ -52,7 +52,6 @@ Global Flags: --log-level uint32 log level (default 4) --no-cleanup do not cleanup temporary resources ---- - To run `transform openrewrite` on application source code, run the following command: + [source,terminal,subs="attributes+"] From a39820076da0e00f17a1d7b801c783ce240a2f90 Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Tue, 9 Jan 2024 19:40:25 +0200 Subject: [PATCH 10/13] update format --- docs/topics/mta-cli-transform.adoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/topics/mta-cli-transform.adoc b/docs/topics/mta-cli-transform.adoc index b4cb033c08e..c4b60f07d89 100644 --- a/docs/topics/mta-cli-transform.adoc +++ b/docs/topics/mta-cli-transform.adoc @@ -33,7 +33,6 @@ Use "{mta-cli} transform [command] --help" for more information about a command. .OpenRewrite The `openrewrite` sub command allows running `OpenRewrite` recipes on source code. -+ [source,terminal,subs="attributes+"] ---- Transform application source code using OpenRewrite recipes @@ -53,7 +52,6 @@ Global Flags: --no-cleanup do not cleanup temporary resources ---- To run `transform openrewrite` on application source code, run the following command: -+ [source,terminal,subs="attributes+"] ---- {mta-cli} transform openrewrite --input= --target= @@ -62,7 +60,7 @@ To run `transform openrewrite` on application source code, run the following com .Rules The `rules` sub command allows converting {LC_PSN} XML rules to analyzer-lsp YAML rules using `windup-shim`. - +[source,terminal,subs="attributes+"] ---- Convert XML rules to YAML @@ -79,6 +77,7 @@ Global Flags: ---- To run `transform rules` on application source code, run: +[source,terminal,subs="attributes+"] ---- {mta-cli} transform rules --input= --output= ---- From c49da6067ef6bc7daee8631e734efaadc19b8dff Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Tue, 9 Jan 2024 19:42:37 +0200 Subject: [PATCH 11/13] update formatting --- docs/topics/mta-cli-transform.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/topics/mta-cli-transform.adoc b/docs/topics/mta-cli-transform.adoc index c4b60f07d89..69f8b928f16 100644 --- a/docs/topics/mta-cli-transform.adoc +++ b/docs/topics/mta-cli-transform.adoc @@ -30,7 +30,7 @@ Global Flags: Use "{mta-cli} transform [command] --help" for more information about a command. ---- -.OpenRewrite +.`OpenRewrite` The `openrewrite` sub command allows running `OpenRewrite` recipes on source code. [source,terminal,subs="attributes+"] @@ -57,7 +57,7 @@ To run `transform openrewrite` on application source code, run the following com {mta-cli} transform openrewrite --input= --target= ---- -.Rules +.`Rules` The `rules` sub command allows converting {LC_PSN} XML rules to analyzer-lsp YAML rules using `windup-shim`. [source,terminal,subs="attributes+"] @@ -96,4 +96,4 @@ To run `transform rules` on application source code, run: ---- {mta-cli} transform openrewrite --input= --target=jakarta-imports ---- -- Inspect the `jakartaee-duke` application source code diff to see the transformation +Inspect the `jakartaee-duke` application source code diff to see the transformation From 2de019ebbdce08deb8bdb8904bba7992ff6e4792 Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Mon, 15 Jan 2024 22:08:25 +0200 Subject: [PATCH 12/13] updating Analyze command options --- docs/topics/mta-cli-analyze.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/topics/mta-cli-analyze.adoc b/docs/topics/mta-cli-analyze.adoc index 472e84df7df..62e9bb13dae 100644 --- a/docs/topics/mta-cli-analyze.adoc +++ b/docs/topics/mta-cli-analyze.adoc @@ -39,8 +39,8 @@ Flags: -o, --output string path to the directory for analysis output --rules stringArray filename or directory containing rule files --skip-static-report do not generate static report - -s, --source stringArray source technology to consider for analysis - -t, --target stringArray target technology to consider for analysis + -s, --source string source technology to consider for analysis. To specify multiple sources, repeat the parameter: --source --source etc. + -t, --target string target technology to consider for analysis. To specify multiple sources, repeat the parameter: --source --source etc. Global Flags: --log-level uint32 log level (default 4) From 1b3cbf6ee5f60b21cd31ca268e0fd5e476fd32dd Mon Sep 17 00:00:00 2001 From: emarcusRH Date: Tue, 16 Jan 2024 12:44:18 +0200 Subject: [PATCH 13/13] updates to new cli guide chapters --- docs/topics/mta-cli-analyze.adoc | 6 +++--- docs/topics/mta-cli-transform.adoc | 14 ++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/topics/mta-cli-analyze.adoc b/docs/topics/mta-cli-analyze.adoc index 62e9bb13dae..d4469d16407 100644 --- a/docs/topics/mta-cli-analyze.adoc +++ b/docs/topics/mta-cli-analyze.adoc @@ -8,7 +8,7 @@ `Analyze` allows running source code and binary analysis using `analyzer-lsp`. -To run analysis on application source code, run the following command: +.To run analysis on application source code, run the following command: [source,terminal,subs="attributes+"] ---- @@ -40,7 +40,7 @@ Flags: --rules stringArray filename or directory containing rule files --skip-static-report do not generate static report -s, --source string source technology to consider for analysis. To specify multiple sources, repeat the parameter: --source --source etc. - -t, --target string target technology to consider for analysis. To specify multiple sources, repeat the parameter: --source --source etc. + -t, --target string target technology to consider for analysis. To specify multiple targets, repeat the parameter: --target --target etc. Global Flags: --log-level uint32 log level (default 4) @@ -55,7 +55,7 @@ Global Flags: ---- {mta-cli} analyze --list-targets ---- -. Run an analysis with a specified target technology. +. Run an analysis with a specified target technology, for example `cloud-readiness`. + [source,terminal,subs="attributes+"] ---- diff --git a/docs/topics/mta-cli-transform.adoc b/docs/topics/mta-cli-transform.adoc index 69f8b928f16..ec49f4e80c9 100644 --- a/docs/topics/mta-cli-transform.adoc +++ b/docs/topics/mta-cli-transform.adoc @@ -30,7 +30,7 @@ Global Flags: Use "{mta-cli} transform [command] --help" for more information about a command. ---- -.`OpenRewrite` +== `OpenRewrite` The `openrewrite` sub command allows running `OpenRewrite` recipes on source code. [source,terminal,subs="attributes+"] @@ -45,19 +45,25 @@ Flags: -h, --help help for openrewrite -i, --input string path to application source code directory -l, --list-targets list all available OpenRewrite recipes + -s, --maven-settings string path to a custom maven settings file to use -t, --target string target openrewrite recipe to use. Run --list-targets to get a list of packaged recipes. Global Flags: --log-level uint32 log level (default 4) --no-cleanup do not cleanup temporary resources ---- -To run `transform openrewrite` on application source code, run the following command: + +.To run `transform openrewrite` on application source code, run the following command: [source,terminal,subs="attributes+"] ---- {mta-cli} transform openrewrite --input= --target= ---- +[NOTE] +==== +You can only use a single target to run the `transform overwrite` command. +==== -.`Rules` +== `Rules` The `rules` sub command allows converting {LC_PSN} XML rules to analyzer-lsp YAML rules using `windup-shim`. [source,terminal,subs="attributes+"] @@ -76,7 +82,7 @@ Global Flags: --log-level int log level (default 5) ---- -To run `transform rules` on application source code, run: +.To run `transform rules` on application source code, run the following: [source,terminal,subs="attributes+"] ---- {mta-cli} transform rules --input= --output=