|
| 1 | +:_newdoc-version: 2.18.3 |
| 2 | +:_template-generated: 2024-11-15 |
| 3 | +:_mod-docs-content-type: PROCEDURE |
| 4 | + |
| 5 | +[id="running-the-containerless-mta-cli_{context}"] |
| 6 | += Running the containerless CLI |
| 7 | + |
| 8 | +Starting from {ProductShortName} 7.2.0, you can perform an application analysis for Java applications by using the {ProductShortName} CLI that does not require installation of a container runtime. |
| 9 | + |
| 10 | +[IMPORTANT] |
| 11 | +==== |
| 12 | +In {ProductShortName} 7.2.0 and later, containerless CLI is a default mode. To enable container runtime usage, you must set the `--run-local` flag to `false`: |
| 13 | +
|
| 14 | +---- |
| 15 | +--run-local=false |
| 16 | +---- |
| 17 | +==== |
| 18 | + |
| 19 | +.Prerequisites |
| 20 | + |
| 21 | +* You have OpenJDK version 17 or later installed on your system. |
| 22 | +* You have Maven installed on your system. |
| 23 | +* The CLI assumes that a path to the `mvn` binary is correctly registered in the system variable. Therefore, ensure that you added `mvn` to the following variable: |
| 24 | +** `Path` for Windows. |
| 25 | +** `PATH` for Linux and macOS. |
| 26 | +* You have the `python3` package installed on your system. |
| 27 | +* You have the `JAVA_HOME` environmental variable set. |
| 28 | +* You have the `JVM_MAX_MEM` system variable set. |
| 29 | ++ |
| 30 | +NOTE: If you do not set `JVM_MAX_MEM`, the analysis might hang. |
| 31 | + |
| 32 | +.Procedure |
| 33 | + |
| 34 | +. Move the installed {ProductShortName} CLI `.zip` file to your `$PATH`: |
| 35 | ++ |
| 36 | +[source,terminal,subs="attributes+"] |
| 37 | +---- |
| 38 | +$ mv <mta_cli_zip>/<os>-kantra /usr/bin |
| 39 | +---- |
| 40 | + |
| 41 | +. Move the requirements to the `.kantra` directory: |
| 42 | ++ |
| 43 | +[source,terminal,subs="attributes+"] |
| 44 | +---- |
| 45 | +$ mv $HOME/kantra.<os>.<arch> $HOME/.kantra |
| 46 | +---- |
| 47 | ++ |
| 48 | +NOTE: The CLI can run with the requirements moved to the directory from which you run an analysis. During the analysis, the CLI checks for the requirements in this directory first, and if it does not find the requirements, it searches for them in the `$HOME/.kantra` directory. |
| 49 | + |
| 50 | + |
| 51 | +. Optional: Display all `mta-cli analyze` command options: |
| 52 | ++ |
| 53 | +[source,terminal,subs="attributes+"] |
| 54 | +---- |
| 55 | +mta-cli analyze --help |
| 56 | +---- |
| 57 | + |
| 58 | +. Run the application analysis: |
| 59 | ++ |
| 60 | +[source,terminal,subs="attributes+"] |
| 61 | +---- |
| 62 | +$ mta-cli analyze --overwrite --input <path_to_input> --output <path_to_output> --target <target_source> |
| 63 | +---- |
| 64 | ++ |
| 65 | +The command arguments represent the following: |
| 66 | + |
| 67 | +** `--overwrite`: Overwrites the output folder if it exists. |
| 68 | +** `--input`: The application to be analyzed. |
| 69 | +** `--output`: The output directory for the generated reports. |
| 70 | +** `--target`: The target technology for the application migration, for example, `eap8`. |
| 71 | + |
| 72 | + |
| 73 | +[role="_additional-resources"] |
| 74 | +.Additional resources |
| 75 | + |
| 76 | +* xref:installing-downloadable-cli-zip_cli-guide[Installing the CLI .zip file] |
| 77 | + |
0 commit comments