이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 5. Add Custom Rules


By default, the Eclipse plugin comes with a core set of system rules for identifying migration and modernization issues. You can browse the existing rules from the Eclipse 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 Eclipse plugin.

5.1. Browse Rules

You can view both system and custom rules from the Eclipse 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 Eclipse 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 Eclipse 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.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat