Getting Started with the Red Hat Application Migration Toolkit Plugin

Identify and Resolve Migration Issues with RHAMT

Run RHAMT against your project to identify and fix migration issues.

  1. Import the project to analyze.
  2. Create a RHAMT run configuration. From the Issue Explorer, press the RHAMT button ().

    At a minimum, select the project to analyze. Set additional options as needed.

  3. Click Run to execute RHAMT.

  4. Review RHAMT issues listed in the Issue Explorer.

  5. Resolve RHAMT issues by manually updating code or by using quick fixes when available.

  6. Run RHAMT again as necessary. Use the drop down next to the Run button () to run an existing configuration.

Create a RHAMT Run Configuration

A RHAMT run configuration can be created using the RHAMT button (). You can create multiple run configurations, each with a unique name.

Input

Select a migration path. This determines which RHAMT rulesets are used. The migration path defaults to Anything to EAP 7, but can be changed to any supported migration path.

Select one or more projects to analyze. Hold the Ctrl key to select multiple projects in the list.

Select one or more packages to scan. It is recommended to select only those packages that you need to analyze to reduce the overall RHAMT execution time. If no packages are selected, all packages in the project will be scanned. Hold the Ctrl key to select multiple packages in the list.

Options

Generate a RHAMT report. Check the Generate Report checkbox if you want to generate the RHAMT HTML report. The report will be shown in the RHAMT Report tab and can be found in the Issue Explorer when you group by File.

Set additional RHAMT options. Any option that is a boolean flag, such as enableTattletale, should enter true as the value. See the RHAMT User Guide for a description of each RHAMT argument.

Rules

Add a custom rules directory if you have any custom RHAMT rules.

Execute RHAMT

Once a run configuration has been created, you can execute RHAMT using that configuration in one of the following ways:

If the RHAMT server is not currently running, it will start once a run configuration is executed. If you do not plan on running RHAMT again in the near future, it is recommended to stop the RHAMT server to conserve memory on your machine.

Review RHAMT Issues

Use the Issue Explorer to review migration issues identified by RHAMT. Different icons indicate the issue's severity and state.

Change how issues are grouped by adjusting the Group By selections: Severity, Migration Rule, File.

Double-click the RHAMT issue in the Issue Explorer to open the associated line of code in an editor. Right-click and select Issue Details to view information about the RHAMT issue, including its severity and how to address it.

Resolve RHAMT Issues

You can resolve RHAMT issues by updating the code manually or by applying a quick fix when available.

Manual Update

Review the RHAMT issue details and additional resources and update the source code as necessary. When you update a line of code marked as a RHAMT issue, the RHAMT issue will be marked with the stale icon () until the next time that RHAMT is run on the project.

You can also manually mark a RHAMT issue as fixed, which will mark the issue with the resolved icon () until the next time that RHAMT is run on the project. To mark an issue as fixed, right-click the RHAMT issue in the Issue Explorer and select Mark as Fixed.

Quick Fix

Some RHAMT issues provide a quick fix, which assists in making the necessary edits to address the issue.

Preview a Quick Fix

Right-click the issue and select Preview Quick Fix. This will bring up a window that allows you to preview the change. From here, you can apply the fix or close the window.

Apply a Quick Fix

Right-click the issue and select Apply Quick Fix. This will update the source code as required and will mark the RHAMT issue as resolved.

RHAMT Issue Legend

In the Issue Explorer and file editors, RHAMT issues use an icon to indicate their severity level and status. The following table describes the meaning of the various icons.

Icon Description
The issue is mandatory to fix for a successful migration.
The issue is optional to fix for migration.
The issue may potentially be an issue during migration.
The issue has been resolved.
The issue is stale because the code marked as an issue has been modified since the last time that RHAMT was run on the project.
A quick fix is available for this issue, which is mandatory to fix for a successful migration.
A quick fix is available for this issue, which is optional to fix for migration.
A quick fix is available for this issue, which may potentially be an issue during migration.

Additional Resources