About {ProductShortName} command-line arguments

The following is a detailed description of the available {ProductShortName} command line arguments.

Note

To run the {ProductShortName} command, for example when executing from a script, you must use the following arguments:

  • --overwrite

  • --input

  • --target

Table 1. {ProductShortName} CLI arguments
Argument Description

--analyze-known-libraries

Flag to analyze known software artifacts embedded within your application. By default, {ProductShortName} only analyzes application code.

Note

This option may result in a longer execution time and a large number of migration issues being reported.

--help

Display the {ProductShortName} help message.

--input

A space-delimited list of the path to the file or directory containing one or more applications to be analyzed. This argument is required.

--list-sources

list rules for available migration sources

--list-sources

Flag to list all available source technologies.

--list-targets

Flag to list all available target technologies.

--output

Specify the path to the directory to output the report information generated by {ProductShortName}.

Important

Do not overwrite a report output directory that contains important information.

--rules stringArray

Filename or directory containing rule files

--source

A space-delimited list of one or more source technologies, servers, platforms, or frameworks to migrate from. This argument, in conjunction with the --target argument, helps to determine which rulesets are used. Use the --listSourceTechnologies argument to list all available sources.

--target

A space-delimited list of one or more target technologies, servers, platforms, or frameworks to migrate to. This argument, in conjunction with the --source argument, helps to determine which rulesets are used. Use the --list-targets argument to list all available targets.

Specifying the input

A space-delimited list of the path to the file or directory containing one or more applications to be analyzed. This argument is required.

Usage
--input <INPUT_ARCHIVE_OR_DIRECTORY> [...]

Analyze application source code

Usage: {mta-cli} analyze [flags]

The following flags are available:

Table 2. {ProductShortName} Analyze application
Flag Description

--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

-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" full (default) or source-only

-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 string

source technology to consider for analysis. To specify multiple sources, repeat the parameter: --source <source_1> --source <source_2> etc.

-t, --target string

target technology to consider for analysis. To specify multiple targets, repeat the parameter: --target <target_1> --target <target_2> etc.

Global flags

Table 3. {ProductShortName} Analyze application
Flag Description

--log-level uint32

log level (default 4)

--no-cleanup

do not cleanup temporary resources

Specifying the output directory

Specify the path to the directory to output the report information generated by {ProductShortName}.

Usage
--output <OUTPUT_REPORT_DIRECTORY>
  • The --output argument is mandatory. If omitted, an error is returned:

    Error: required flag(s) "output" not set

However, if you specify the --overwrite argument, {ProductShortName} will proceed to delete and recreate the directory. See the description of this argument for more information.

Setting the source technology

A space-delimited list of one or more source technologies, servers, platforms, or frameworks to migrate from. This argument, in conjunction with the --target argument, helps to determine which rulesets are used. Use the --list-sources argument to list all available sources.

Usage
--source <SOURCE_1> <SOURCE_2>

The --source argument now provides version support, which follows the Maven version range syntax. This instructs {ProductShortName} to only run the rulesets matching the specified versions. For example, --source eap5.

Warning

When migrating to JBoss EAP, be sure to specify the version, for example, eap6. Specifying only eap will run rulesets for all versions of JBoss EAP, including those not relevant to your migration path.

See Supported migration paths in Introduction to the Migration Toolkit for Applications for the appropriate JBoss EAP version.

Setting the target technology

A space-delimited list of one or more target technologies, servers, platforms, or frameworks to migrate to. This argument, in conjunction with the --source argument, helps to determine which rulesets are used. If you do not provide a target, mta-cli analyzes the input based on the source and discovery rules. Use the --list-targets argument to list all available targets.

Usage
--target <TARGET_1> <TARGET_2>

The --target argument now provides version support, which follows the Maven version range syntax. This instructs {ProductShortName} to only run the rulesets matching the specified versions. For example, --target eap7.

Warning

When migrating to JBoss EAP, be sure to specify the version in the target, for example, eap6. Specifying only eap will run rulesets for all versions of JBoss EAP, including those not relevant to your migration path.

See Supported migration paths in Introduction to the Migration Toolkit for Applications for the appropriate JBoss EAP version.