Skip to content

Commit bdf6f49

Browse files
committed
add
Signed-off-by: A.Arnold <[email protected]>
1 parent b08e7d6 commit bdf6f49

File tree

3 files changed

+268
-0
lines changed

3 files changed

+268
-0
lines changed

docs/topics/cli-run.adoc

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * docs/cli-guide/master.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="cli-run_{context}"]
7+
= Running the {CLINameTitle}
8+
9+
You can run {ProductShortName} against your application.
10+
11+
.Procedure
12+
13+
. Open a terminal and navigate to the `<{ProductShortName}_HOME>/bin/` directory.
14+
. Execute the `windup-cli` script, or `windup-cli.bat` for Windows, and specify the appropriate arguments:
15+
+
16+
[source,terminal,subs="attributes+"]
17+
----
18+
$ ./windup-cli --input /path/to/jee-example-app-1.0.0.ear \
19+
--output /path/to/output --source weblogic --target eap:6 \
20+
--packages com.acme org.apache
21+
----
22+
+
23+
* `--input`: The application to be evaluated.
24+
* `--output`: The output directory for the generated reports.
25+
* `--source`: The source technology for the application migration.
26+
* `--target`: The target technology for the application migration.
27+
* `--packages`: The packages to be evaluated. This argument is highly recommended to improve performance.
28+
29+
. Access the report.
30+
31+
[id="command-examples_{context}"]
32+
== {ProductShortName} command examples
33+
34+
[discrete]
35+
=== Running {ProductShortName} on an application archive
36+
37+
The following command analyzes the `com.acme` and `org.apache` packages of the link:https://github.com/windup/windup/blob/master/test-files/jee-example-app-1.0.0.ear[jee-example-app-1.0.0.ear] example EAR archive for migrating from JBoss EAP 5 to JBoss EAP 7:
38+
39+
[source,terminal,subs="attributes+"]
40+
----
41+
42+
$ <{ProductShortName}_HOME>/bin/windup-cli \
43+
44+
--input /path/to/jee-example-app-1.0.0.ear \
45+
--output /path/to/report-output/ --source eap:5 --target eap:7 \
46+
--packages com.acme org.apache
47+
----
48+
[]
49+
50+
[discrete]
51+
=== Running {ProductShortName} on source code
52+
53+
The following command analyzes the `org.jboss.seam` packages of the link:https://github.com/windup/windup/tree/master/test-files/seam-booking-5.2[seam-booking-5.2] example source code for migrating to JBoss EAP 6.
54+
55+
[source,terminal,subs="attributes+"]
56+
----
57+
58+
$ <{ProductShortName}_HOME>/bin/windup-cli --sourceMode --input /path/to/seam-booking-5.2/ \
59+
60+
--output /path/to/report-output/ --target eap:6 --packages org.jboss.seam
61+
----
62+
[]
63+
[discrete]
64+
=== Running cloud-readiness rules
65+
66+
The following command analyzes the `com.acme` and `org.apache` packages of the link:https://github.com/windup/windup/blob/master/test-files/jee-example-app-1.0.0.ear[jee-example-app-1.0.0.ear] example EAR archive for migrating to JBoss EAP 7. It also evaluates for cloud readiness:
67+
68+
[source,terminal,subs="attributes+"]
69+
----
70+
71+
$ <{ProductShortName}_HOME>/windup-cli --input /path/to/jee-example-app-1.0.0.ear \
72+
73+
--output /path/to/report-output/ \
74+
--target eap:7 --target cloud-readiness --packages com.acme org.apache
75+
----
76+
[]
77+
78+
[discrete]
79+
=== Overriding {ProductShortName} properties
80+
81+
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:
82+
83+
[source,terminal,subs="attributes+"]
84+
----
85+
$ <{ProductShortName}_HOME>/bin/windup-cli -Dwindup.decompiler=procyon \
86+
--input <INPUT_ARCHIVE_OR_DIRECTORY> --output <OUTPUT_REPORT_DIRECTORY> \
87+
--target <TARGET_TECHNOLOGY> --packages <PACKAGE_1> <PACKAGE_2>
88+
----
89+
90+
[id="cli-bash-completion_{context}"]
91+
== {ProductShortName} {CLINameTitle} Bash completion
92+
93+
The {ProductShortName} {CLIName} provides an option to enable Bash completion for Linux systems, allowing the {ProductShortName} command-line arguments to be auto completed by pressing the Tab key when entering the commands. For instance, when Bash completion is enabled, entering the following displays a list of available arguments.
94+
95+
[source,terminal,subs="attributes+"]
96+
----
97+
98+
$ <{ProductShortName}_HOME>/bin/windup-cli [TAB]
99+
100+
----
101+
102+
[discrete]
103+
[id="bash-completion-temporary_{context}"]
104+
=== Enabling Bash completion
105+
106+
To enable Bash completion for the current shell, execute the following command:
107+
108+
[source,terminal,subs="attributes+"]
109+
----
110+
$ source <{ProductShortName}_HOME>/bash-completion/windup-cli
111+
----
112+
113+
[discrete]
114+
[id="bash-completion-persistent_{context}"]
115+
=== Enabling persistent Bash completion
116+
117+
The following commands allow Bash completion to persist across restarts:
118+
119+
* To enable Bash completion for a specific user across system restarts, include the following line in that user's `~/.bashrc` file.
120+
+
121+
[source,terminal,subs="attributes+"]
122+
----
123+
source <{ProductShortName}_HOME>/bash-completion/windup-cli
124+
----
125+
126+
* 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.
127+
+
128+
[source,terminal,subs="attributes+"]
129+
----
130+
# cp <{ProductShortName}_HOME>/bash-completion/windup-cli /etc/bash_completion.d/
131+
----
132+
133+
[id="accessing-help_{context}"]
134+
== Accessing {ProductShortName} help
135+
136+
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:
137+
138+
[source,terminal,subs="attributes+"]
139+
----
140+
141+
$ <{ProductShortName}_HOME>/bin/windup-cli --help
142+
143+
----

docs/topics/mta-cli-run.adoc

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * docs/cli-guide/master.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="cli-run_{context}"]
7+
= Running the {CLINameTitle}
8+
9+
You can run {ProductShortName} against your application.
10+
11+
.Procedure
12+
13+
. Open a terminal and navigate to the `<{ProductShortName}_HOME>/` directory.
14+
15+
. Execute the `{mta-cli}` script, or `{mta-cli}.exe` for Windows, and specify the appropriate arguments:
16+
17+
+
18+
[source,terminal,subs="attributes+"]
19+
----
20+
$ ./{mta-cli} analyze --input /path/to/jee-example-app-1.0.0.ear \
21+
--output /path/to/output --source weblogic --target eap6 \
22+
----
23+
+
24+
* `--input`: The application to be evaluated.
25+
* `--output`: The output directory for the generated reports.
26+
* `--source`: The source technology for the application migration.
27+
28+
. Access the report.
29+
30+
[id="command-examples_{context}"]
31+
== {ProductShortName} command examples
32+
33+
[discrete]
34+
=== Running {ProductShortName} on an application archive
35+
36+
The following command analyzes the link:https://github.com/windup/windup/blob/master/test-files/jee-example-app-1.0.0.ear[jee-example-app-1.0.0.ear] example EAR archive for migrating from JBoss EAP 5 to JBoss EAP 7:
37+
38+
[source,terminal,subs="attributes+"]
39+
----
40+
$ <{ProductShortName}_HOME>/{mta-cli} analyze \
41+
--input /path/to/jee-example-app-1.0.0.ear \
42+
--output /path/to/report-output/ --source eap5 --target eap7
43+
----
44+
[]
45+
46+
[discrete]
47+
=== Running {ProductShortName} on source code
48+
49+
The following command analyzes the link:https://github.com/windup/windup/tree/master/test-files/seam-booking-5.2[seam-booking-5.2] example source code for migrating to JBoss EAP 6.
50+
51+
[source,terminal,subs="attributes+"]
52+
----
53+
54+
$ <{ProductShortName}_HOME>/{mta-cli} analyze --mode source-only --input /path/to/seam-booking-5.2/ \
55+
--output /path/to/report-output/ --target eap6 --packages org.jboss.seam
56+
----
57+
[]
58+
[discrete]
59+
=== Running cloud-readiness rules
60+
61+
The following command analyzes the link:https://github.com/windup/windup/blob/master/test-files/jee-example-app-1.0.0.ear[jee-example-app-1.0.0.ear] example EAR archive for migrating to JBoss EAP 7. It also evaluates for cloud readiness:
62+
63+
[source,terminal,subs="attributes+"]
64+
----
65+
$ <{ProductShortName}_HOME>/{mta-cli} analyze --input /path/to/jee-example-app-1.0.0.ear \
66+
--output /path/to/report-output/ \
67+
--target eap7
68+
----
69+
[]
70+
71+
[id="docker-command-examples_{context}"]
72+
== Docker {ProductShortName} command examples (Developer Preview)
73+
74+
When migrating a Windows .NET 4.5 or later application to cross-platform .NET 8, use Docker Desktop on Windows to analyze the application.
75+
76+
.Procedure
77+
78+
. Run the Docker Desktop for Windows as an administrator.
79+
80+
. Open a PowerShell instance as an administrator.
81+
82+
. Navigate to the {ProductShortName} directory:
83+
+
84+
[source,powershell]
85+
----
86+
PS C:\Users\<your_user_name> cd C:\Users\<your_user_name>\MTA
87+
----
88+
+
89+
Replace `<your_user_name>` with the username for your home directory.
90+
91+
. Create a directory for analysis output:
92+
+
93+
[source,powershell]
94+
----
95+
PS C:\Users\<your_user_name>\MTA> mkdir mta-output
96+
----
97+
98+
. Copy your application to the {ProductShortName} directory. The following command clones the link:https://github.com/sixeyed/nerd-dinner[Nerd Dinner] application as an example application:
99+
+
100+
[source,powershell]
101+
----
102+
PS C:\Users\<your_user_name>\MTA> git clone https://github.com/sixeyed/nerd-dinner.git
103+
----
104+
105+
. Analyze the application. The following command analyzes the link:https://github.com/sixeyed/nerd-dinner[Nerd Dinner] application for migrating from Windows .NET 4.5 or later to cross-platform .NET 8:
106+
+
107+
[source,powershell]
108+
----
109+
PS C:\Users\<your_user_name>\MTA> .\mta-cli.exe analyze `
110+
--input C:\Users\<your_user_name>\MTA\nerd-dinner\mvc4\ `
111+
--output C:\Users\<your_user_name>\MTA\mta-output\ `
112+
--overwrite --log-level 10 --label-selector konveyor.io/source=dotnetframework
113+
----
114+
+
115+
Replace `<your_user_name>` with the username for your home directory.
116+
117+
. Review the analysis results:
118+
+
119+
[source,powershell]
120+
----
121+
PS C:\Users\<your_user_name>\MTA> start-process "msedge" `
122+
-ArgumentList "file:///C:/Users/<your_user_name>/MTA/mta-output/static-report/index.html"
123+
----
124+
+
125+
Replace `<your_user_name>` with the username for your home directory.

docs/topics/proc_cli-execute.adoc

Whitespace-only changes.

0 commit comments

Comments
 (0)