Chapter 5. Add Custom Rules


By default, the IDE Plugin comes with a core set of system rules for identifying migration and modernization issues. You can browse the existing rules from the IDE Plugin.

You can also create your own rules for identifying issues specific to your applications. You can either import an existing custom ruleset or create a custom ruleset directly in the IDE Plugin.

5.1. Browse Rules

You can view both system and custom rules from the IDE Plugin.

  1. From the MTA perspective, open the Rulesets tab.
  2. Expand the System item to view core system rules, or expand the Custom item to view custom rules.

    Note

    In order to view system rules, the MTA server must be started.

  3. Expand the ruleset containing the rule you want to review.
  4. Double-click the rule to open the rule in a viewer. You can select the Source tab to view the XML source of the rule.

5.2. Import a Custom Ruleset

You can import an existing custom ruleset into the IDE Plugin to use during analysis of your projects.

  1. From the MTA perspective, open the Rulesets tab.
  2. Click the import ruleset icon ( Import ruleset icon ).
  3. Browse to and select the XML rule file to import.

    Note

    The XML rule file must use the .windup.xml or .rhamt.xml extension in order to be recognized as an MTA rule.

  4. The custom ruleset is now shown under the Custom item in the Rulesets tab.

This custom ruleset can now be selected in run configurations when analyzing projects.

See the Rules Development Guide to learn more about creating custom XML rules.

5.3. Create a Custom Ruleset

You can create a new custom ruleset in the IDE Plugin to use during analysis of your projects.

  1. From the MTA perspective, open the Rulesets tab.
  2. Click the create ruleset icon ( Create ruleset icon ).
  3. Select the project and directory to save the new ruleset in.
  4. Enter the file name for the ruleset file.

    Note

    The XML rule file must use the .windup.xml or .rhamt.xml extension in order to be recognized as an MTA rule.

  5. Enter a ruleset ID, for example, my-ruleset-id.
  6. Optionally, check the Generate quickstart template checkbox to add basic rule templates to the ruleset file.
  7. Select Finish.
  8. The new ruleset file opens in an editor and you can add and edit rules in the file. You can also select the Source tab to edit the XML source for the ruleset file.

This new ruleset can now be selected in run configurations when analyzing projects.

See the Rules Development Guide to learn more about creating custom XML rules.

5.4. Submit a Custom Ruleset

Once a custom ruleset has been created it can be submitted for inclusion within the official MTA rule repository. This allows your custom rules to be reviewed and included in subsequent releases of MTA, enhancing the applications and server configurations that MTA analyzes.

  1. From the MTA perspective, open the Rulesets tab.
  2. Click the dropdown icon ( Dropdown ).
  3. Click Submit Ruleset from the options that appear. This will launch a new page in your browser.
  4. On the page that appears complete the following fields.

    1. In the Summary field, enter in the purpose of the rule. This becomes the title of the submission.
    2. In the Code Sample text field, enter an example of source code that the rule should run against.
    3. Click Choose Files and navigate to the saved rule to attach it.
    4. In the Description text field, enter in a brief description of the rule.
  5. Once all information has been entered, click Submit to complete the submission.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat, Inc.