|
| 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 | +---- |
0 commit comments