Detailed Migration Analysis Report

The Migration Toolkit for Application Binaries can generate an analysis report that contains details about potential migration issues in your application. The tool helps you quickly and easily evaluate WebSphere Application Server traditional applications for their readiness to run on Liberty in both cloud and on-premises environments. The tool also supports migrating from JBoss, WebLogic, Apache Tomcat and other third-party application servers and between versions of WebSphere traditional, starting with WebSphere Application Server Version 6.1.

The report gives details about which rules were flagged for your application binaries. For each flagged result, the report lists the affected file along with the match criteria, the method name if applicable, and the line number if available. Line numbers are only available for results that occur within a method body. Some of the flagged rules will provide an automated fix that can be utilized to address the issues quickly. The report will included the generated configuration to perform the automated source code changes using recipes in the OpenRewrite open source project rewrite-liberty.

To generate this report from the command line, the binaryInputPath parameter and --analyze action are required.

To generate this report and run rules pertaining only to JavaSE migration, you can specify the binaryInputPath parameter with --analyzeJavaSE.

  • The binaryInputPath parameter is an absolute or relative path to a Java EE archive, Java archive or directory that contains those archives. If you specify a directory for the binaryInputPath parameter, the contents of that directory are evaluated as a single application. If you scan a directory that contains multiple applications, the report contains the combined results. To better understand which application uses which technology, run the tool on the individual applications.
  • The --analyze action generates the Detailed Migration Analysis Report.

If no application server options are specified, then --sourceAppServer=was855 and --targetAppServer=liberty are the default.

Run commands from the wamt directory in your Migration Toolkit for Application Binaries installation. For a complete list of supported options for detailed migration analysis, run the following command:
java -jar binaryAppScanner.jar --help --analyze

The following examples demonstrate different ways to generate the report using the command options:

  • To display the default report, an HTML report for a migration from WebSphere Application Server traditional V8.5.5 to Liberty, run the following command:
    
    java -jar binaryAppScanner.jar binaryInputPath --analyze
                        
  • To save the report to a specific file, additionally specify the --output parameter with a file name. If the file name is not fully qualified, the file is created in the current directory.
    For example, the following command outputs the report to the /MyAppDir/MyAppReport.html file.
    java -jar binaryAppScanner.jar MyApp.ear --analyze --targetCloud=cfIBMCloud
    					--output=/MyAppDir/MyAppReport.html
  • To create a JSON-formatted report file with the default name of MyAppDir_AnalysisReport.json in the current directory where binaryInputPath is set to /MyAppDir, run the following command:
    java -jar binaryAppScanner.jar /MyAppDir --analyze --format=json
  • To specify user-defined rules, specify the --userRuleLocation parameter with the directory containing your rule definitions and lists. For more information on creating user-defined rules, see User-Defined Rules.
    For example, the following command will run the user-defined rules along with the rules for migrating from WebSphere traditional to Liberty.
    java -jar binaryAppScanner.jar MyApp.ear --all --sourceAppServer=was90 --targetAppServer=liberty --userRuleLocation=/path/to/rules
Figure 1. Detailed Migration Analysis Report in HTML format
Detailed Migration Analysis Report

The rule severity helps identify the impact of an issue on your application migration.

Rule severity Source scanner icon Binary scanner icon Description
Severe Eclipse severe icon Binary severe icon Severe rules indicate an API removal or behavior change that can break the application and that must be addressed.
Warning Eclipse warning icon Binary warning icon Warning rules indicate behavior changes that might break the application and that should be evaluated.
Information Eclipse information icon Binary information icon Information rules indicate the use of deprecated APIs or minor behavior changes that will not affect most applications.

Rules with an automated fix have an additional icon next to the severity icon. The detailed help for these rules will indicate the availability of an automated fix and provide a link to the report section with the generated configuration that can be run through Maven or Gradle build invocations, depending on your preferred platform.

Figure 2. Rule with Automated Fix Symbol
Rule with Automated Fix Symbol
Figure 3. Config Element
Config Element

The line number column might be empty, depending on whether the reference was within a method body and whether the application was compiled with line numbers. References outside of method bodies, such as class annotations, class variables, method annotations, and method parameters, do not have line numbers. For those references, the reference details contain information about the type of reference to help you pinpoint the location.

For reports in JSON format, missing line numbers are reported as an integer with a value of zero, and missing reference details and match criteria are reported as a null value.