ルール開発ガイド
移行範囲を強化するためのカスタムルールを作成
概要
第1章 はじめに
1.1. ルール開発ガイドについて
本ガイドは、Migration Toolkit for Applications (MTA) ツールのカスタム XML ベースのルールを作成するエンジニア、コンサルタント、およびその他のユーザーを対象としています。
MTA を初めて使用する場合は、Migration Toolkit for Applications の機能とシステム要件の概要について、スタートガイド から始めることを推奨します。また、CLI のインストール方法および実行方法が記載されている CLI ガイド を確認することが推奨されます。
MTA ソースコードベースに貢献したり、Java ベースのルールアドオンを提供する場合は、Core Development Guide を参照してください。
1.1.1. このガイドでの RHAMT_HOME の使用
このガイドでは、置き換え可能な変数 RHAMT_HOME
を使用して、MTA インストールへのパスを示します。インストールディレクトリーは、MTA ZIP ディストリビューションを解凍した rhamt-cli-4.2.1.Final
ディレクトリーです。
このガイドで RHAMT_HOME
が表示されたら、必ずMTAのインストール先への実際のパスに置き換えてください。
1.2. MTA ルール
Migration Toolkit for Applications (MTA) には、移行予定のアプリケーションが使用する API、テクノロジー、アーキテクチャーを分析するルールベースの移行ツールが含まれています。実際、MTA 分析プロセスは MTA ルールを使用して実装されます。MTA は内部でルールを使用して、アーカイブからのファイルの抽出、ファイルの逆コンパイル、ファイルタイプのスキャンと分類、XML およびその他のファイルコンテンツの分析、アプリケーションコードの分析、レポートの作成を行います。
MTA は、ルール実行結果に基づいてデータモデルを構築し、グラフデータベースにコンポーネントデータと関係を格納します。これにより、移行ルールやレポート目的に応じてクエリーおよび更新が可能になります。
MTA ルールでは、以下のルールパターンを使用します。
when(condition) perform(action) otherwise(action)
when(condition)
perform(action)
otherwise(action)
MTA は、標準の包括的な移行ルールの包括的なセットをそのまま使用できます。アプリケーションにはカスタムライブラリーまたはコンポーネントが含まれる可能性があるため、MTA では独自のルールを作成して、既存のルールセットで対応していない可能性のあるコンポーネントやソフトウェアの使用を特定することができます。
第2章 スタートガイド
カスタム MTA ルールの作成を開始するには、ルールの作成について確認 するか、クイックスタートを確認 してください。
2.1. 最初の XML ルールの作成
本セクションでは、最初の MTA XML ベースのルールを作成してテストするプロセスを説明します。これは、すでに MTA がインストールされていることを前提としています。インストール手順は、CLI ガイド を参照してください。
この例では、アプリケーションが <class-loading>
要素を含む jboss-web.xml
ファイルの定義を行うインスタンスを検出するルールを記述します。また、コードの移行方法を説明するドキュメントへのリンクを提供します。
ルールのディレクトリー構造の作成
最初のルールと、テストに使用するデータファイルを含むディレクトリー構造を作成します。
mkdir -p /home/USER_NAME/migration-rules/rules mkdir -p /home/USER_NAME/migration-rules/data
$ mkdir -p /home/USER_NAME/migration-rules/rules
$ mkdir -p /home/USER_NAME/migration-rules/data
このディレクトリー構造は、生成された MTA レポートを保持するためにも使用されます。
ルールをテストするためのデータの作成
-
/home/USER_NAME/migration-rules/data/
サブディレクトリーにjboss-web.xml
ファイルを作成します。 以下の内容にコピーします。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd"> <jboss-web> <class-loading java2ClassLoadingCompliance="false"> <loader-repository> seam.jboss.org:loader=@projectName@ <loader-repository-config>java2ParentDelegation=false</loader-repository-config> </loader-repository> </class-loading> </jboss-web>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd"> <jboss-web> <class-loading java2ClassLoadingCompliance="false"> <loader-repository> seam.jboss.org:loader=@projectName@ <loader-repository-config>java2ParentDelegation=false</loader-repository-config> </loader-repository> </class-loading> </jboss-web>
ルールの作成
MTA XML ベースのルールは、以下のルールパターンを使用します。
when(condition) perform(action) otherwise(action)
when(condition)
perform(action)
otherwise(action)
ルールセットとルールの XML 要素については、XML ルールの構造 セクションで詳しく説明します。構文例を使用した XML ルールの作成の詳細については、基本的な XML ルールの作成 を参照してください。
/home/USER_NAME/migration-rules/rules/
サブディレクトリーにJBoss5-web-class-loading.windup.xml
という名前の XML ファイルを作成します。以下の内容にコピーします。Copy to Clipboard Copied! Toggle word wrap Toggle overflow <?xml version="1.0"?> <ruleset id="UNIQUE_RULESET_ID" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <metadata> <description> <!-- Ruleset Description --> </description> <dependencies> <!-- Ruleset Dependencies --> </dependencies> <sourceTechnology id="SOURCE_ID" versionRange="SOURCE_VERSION_RANGE"/> <targetTechnology id="TARGET_ID" versionRange="TARGET_VERSION_RANGE"/> <tag>Reviewed-2015-05-01</tag> </metadata> <rules> <rule id="UNIQUE_RULE_ID"> <when> <!-- Test for a condition here --> </when> <perform> <!-- Perform an action --> </perform> </rule> </rules> </ruleset>
<?xml version="1.0"?> <ruleset id="UNIQUE_RULESET_ID" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <metadata> <description> <!-- Ruleset Description --> </description> <dependencies> <!-- Ruleset Dependencies --> </dependencies> <sourceTechnology id="SOURCE_ID" versionRange="SOURCE_VERSION_RANGE"/> <targetTechnology id="TARGET_ID" versionRange="TARGET_VERSION_RANGE"/> <tag>Reviewed-2015-05-01</tag> </metadata> <rules> <rule id="UNIQUE_RULE_ID"> <when> <!-- Test for a condition here --> </when> <perform> <!-- Perform an action --> </perform> </rule> </rules> </ruleset>
注記MTA は、拡張子が
.windup.xml
または.rhamt.xml
のファイルを XML ベースのルールとして識別するため、必ずこの命名規則を使用してください。そうしないと、ルールが評価されません。ルールセットとルールに一意の識別子を追加します。
-
UNIQUE_RULESET_ID
を、適切なルールセット ID (例:JBoss5-web-class-loading
) に置き換えます。 -
UNIQUE_RULE_ID
を、適切なルール ID (例:JBoss5-web-class-loading_001
) に置き換えます。
-
次のルールセットアドオン依存関係を追加します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow <dependencies> <addon id="org.jboss.windup.rules,windup-rules-javaee,3.0.0.Final"/> <addon id="org.jboss.windup.rules,windup-rules-java,3.0.0.Final"/> </dependencies>
<dependencies> <addon id="org.jboss.windup.rules,windup-rules-javaee,3.0.0.Final"/> <addon id="org.jboss.windup.rules,windup-rules-java,3.0.0.Final"/> </dependencies>
ソースおよびターゲットのテクノロジーを追加します。
-
SOURCE_ID
をeap
に置き換えます。 -
TARGET_ID
をeap
に置き換えます。
-
ソースおよびターゲットのテクノロジーバージョンを設定します。
-
SOURCE_VERSION_RANGE
を(4,5)
に置き換えます。 -
TARGET_VERSION_RANGE
を[6,)
に置き換えます。
この構文のヘルプについては、Apache Maven バージョン範囲の仕様 を参照してください。
-
when
条件を完了します。このルールは XML ファイルの一致をテストするため、ファイルの評価には
xmlfile
が使用されます。jboss-web
の子であるclass-loading
要素と一致するには、xpath 式jboss-web/class-loading
を使用します。Copy to Clipboard Copied! Toggle word wrap Toggle overflow <when> <xmlfile matches="jboss-web/class-loading" /> </when>
<when> <xmlfile matches="jboss-web/class-loading" /> </when>
このルールの
perform
アクションを完了します。-
説明的なタイトルと作業レベル
1
を使用して分類を追加します。 ヒントに情報メッセージと、移行の詳細を説明するドキュメントへのリンクを提供します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow <perform> <iteration> <classification title="JBoss Web Application Descriptor" effort="1"/> <hint title="JBoss Web XML class-loading element is no longer valid"> <message> The class-loading element is no longer valid in the jboss-web.xml file. </message> <link href="https://access.redhat.com/documentation/ja-JP/JBoss_Enterprise_Application_Platform/6.4/html-single/Migration_Guide/index.html#Create_or_Modify_Files_That_Control_Class_Loading_in_JBoss_Enterprise_Application_Platform_6" title="Create or Modify Files That Control Class Loading in JBoss EAP 6"/> </hint> </iteration> </perform>
<perform> <iteration> <classification title="JBoss Web Application Descriptor" effort="1"/> <hint title="JBoss Web XML class-loading element is no longer valid"> <message> The class-loading element is no longer valid in the jboss-web.xml file. </message> <link href="https://access.redhat.com/documentation/ja-JP/JBoss_Enterprise_Application_Platform/6.4/html-single/Migration_Guide/index.html#Create_or_Modify_Files_That_Control_Class_Loading_in_JBoss_Enterprise_Application_Platform_6" title="Create or Modify Files That Control Class Loading in JBoss EAP 6"/> </hint> </iteration> </perform>
-
説明的なタイトルと作業レベル
ルールは完了し、以下の例のようになるはずです。
<?xml version="1.0"?> <ruleset id="JBoss5-web-class-loading" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <metadata> <description> This ruleset looks for the class-loading element in a jboss-web.xml file, which is no longer valid in JBoss EAP 6 </description> <dependencies> <addon id="org.jboss.windup.rules,windup-rules-javaee,3.0.0.Final"/> <addon id="org.jboss.windup.rules,windup-rules-java,3.0.0.Final"/> </dependencies> <sourceTechnology id="eap" versionRange="(4,5)"/> <targetTechnology id="eap" versionRange="[6,)"/> </metadata> <rules> <rule id="JBoss5-web-class-loading_001"> <when> <xmlfile matches="jboss-web/class-loading" /> </when> <perform> <iteration> <classification title="JBoss Web Application Descriptor" effort="1"/> <hint title="JBoss Web XML class-loading element is no longer valid"> <message> The class-loading element is no longer valid in the jboss-web.xml file. </message> <link href="https://access.redhat.com/documentation/ja-JP/JBoss_Enterprise_Application_Platform/6.4/html-single/Migration_Guide/index.html#Create_or_Modify_Files_That_Control_Class_Loading_in_JBoss_Enterprise_Application_Platform_6" title="Create or Modify Files That Control Class Loading in JBoss EAP 6"/> </hint> </iteration> </perform> </rule> </rules> </ruleset>
<?xml version="1.0"?>
<ruleset id="JBoss5-web-class-loading"
xmlns="http://windup.jboss.org/schema/jboss-ruleset"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<metadata>
<description>
This ruleset looks for the class-loading element in a jboss-web.xml file, which is no longer valid in JBoss EAP 6
</description>
<dependencies>
<addon id="org.jboss.windup.rules,windup-rules-javaee,3.0.0.Final"/>
<addon id="org.jboss.windup.rules,windup-rules-java,3.0.0.Final"/>
</dependencies>
<sourceTechnology id="eap" versionRange="(4,5)"/>
<targetTechnology id="eap" versionRange="[6,)"/>
</metadata>
<rules>
<rule id="JBoss5-web-class-loading_001">
<when>
<xmlfile matches="jboss-web/class-loading" />
</when>
<perform>
<iteration>
<classification title="JBoss Web Application Descriptor" effort="1"/>
<hint title="JBoss Web XML class-loading element is no longer valid">
<message>
The class-loading element is no longer valid in the jboss-web.xml file.
</message>
<link href="https://access.redhat.com/documentation/ja-JP/JBoss_Enterprise_Application_Platform/6.4/html-single/Migration_Guide/index.html#Create_or_Modify_Files_That_Control_Class_Loading_in_JBoss_Enterprise_Application_Platform_6" title="Create or Modify Files That Control Class Loading in JBoss EAP 6"/>
</hint>
</iteration>
</perform>
</rule>
</rules>
</ruleset>
ルールのインストール
MTA ルールは、ルールを適切なディレクトリーに配置してインストールされます。カスタムルールを配置できる場所については、ルールを MTA に追加する を参照してください。
JBoss5-web-class-loading.windup.xml
ファイルを RHAMT_HOME/rules/
ディレクトリーにコピーします。
cp /home/USER_NAME/migration-rules/rules/JBoss5-web-class-loading.windup.xml RHAMT_HOME/rules/
$ cp /home/USER_NAME/migration-rules/rules/JBoss5-web-class-loading.windup.xml RHAMT_HOME/rules/
ルールのテスト
端末を開き、以下のコマンドを実行して、テストファイルを入力引数として、出力レポートのディレクトリーとして渡します。
RHAMT_HOME/bin/rhamt-cli --sourceMode --input /home/USER_NAME/migration-rules/data --output /home/USER_NAME/migration-rules/reports --target eap:6
$ RHAMT_HOME/bin/rhamt-cli --sourceMode --input /home/USER_NAME/migration-rules/data --output /home/USER_NAME/migration-rules/reports --target eap:6
以下の結果が表示されるはずです。
Report created: /home/USER_NAME/migration-rules/reports/index.html Access it at this URL: file:///home/USER_NAME/migration-rules/reports/index.html
Report created: /home/USER_NAME/migration-rules/reports/index.html
Access it at this URL: file:///home/USER_NAME/migration-rules/reports/index.html
レポートを確認する
レポートを確認して、予想される結果が表示されることを確認します。MTA レポートの詳細は、MTA のCLI ガイド の レポートの確認 セクションを参照してください。
-
Web ブラウザーで
/home/USER_NAME/migration-rules/reports/index.html
を開きます。 ルールが実行されていることを確認します。
- 主な編集ページから、Rule providers execution overview リンクをクリックし、Rule Providers Execution Overview を開きます。
JBoss5-web-class-loading_001
ルールを探して、Status? がCondition met
で、Result? がsuccess
であることを確認します。図2.1 ルール実行のテスト
ルールがテストデータと一致していることを確認します。
-
メインの発行ページから、この例の
データ
であるアプリケーションまたは入力フォルダーの名前をクリックします。 - Application Details レポートリンクをクリックします。
jboss-web.xml リンクをクリックして、ソースレポート を表示します。
<class-loading>
行が強調表示されており、カスタムルールからのヒントがインラインで表示されます。図2.2 ルール一致
ファイルの上部には、一致するルールの分類が表示されます。リンクアイコンを使用すると、そのルールの詳細を表示できます。この例では、
jboss-web.xml
ファイルが1
つのストーリーポイントを生成した別のルール (JBoss web application descriptor (jboss-web.xml)
) と一致することに注意してください。これは、カスタムルールから1
つのストーリーポイントと組み合わせて、このファイルの合計部分を2
にまとめます。
-
メインの発行ページから、この例の
2.2. Migration Toolkit for Applications クイックスタートの確認
Migration Toolkit for Applications クイックスタートは、カスタム Java ベースのルールアドオンおよび XML ルールの作成方法に関する作業例を提供します。カスタムルールを作成する際の開始点として使用することができます。
クイックスタートの最新リリースバージョンの .zip ファイルをダウンロード できます。また、ソースコードを使用する場合は、windup-quickstarts
プロジェクトリポジトリーをフォークし、クローン できます。
各クイックスタートには、そのクイックスタートの指示が含まれる README.adoc
ファイルがあります。
最新のクイックスタート ZIP のダウンロード
- ブラウザーを開き、https://github.com/windup/windup-quickstarts/releases に移動します。
- 最新のリリースをクリックして、ZIP ファイルをローカルファイルシステムにダウンロードします。
クイックスタート GitHub プロジェクトをフォークしてクローンする
git
クライアントがマシンにインストールされていること。
-
Migration Toolkit for Applications クイックスタート GitHub ページで
Fork
リンクをクリックし、自分用の Git にプロジェクトを作成します。fork によって作成されたフォークされた GitHub リポジトリーの URL はhttps://github.com/YOUR_USER_NAME/windup-quickstarts.git
のようになります。 Migration Toolkit for Applications クイックスタートリポジトリーをローカルのファイルシステムにクローンします。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow git clone https://github.com/YOUR_USER_NAME/windup-quickstarts.git
$ git clone https://github.com/YOUR_USER_NAME/windup-quickstarts.git
これにより、ローカルファイルシステムに
windup-quickstarts
ディレクトリーが作成され、設定されます。新規作成されたディレクトリーに移動します。以下に例を示します。Copy to Clipboard Copied! Toggle word wrap Toggle overflow cd windup-quickstarts/
$ cd windup-quickstarts/
最新のコード更新を取得できるようにする場合は、リモートの
upstream
リポジトリーを追加して、元のフォークしたリポジトリーに変更を取得できるようにします。Copy to Clipboard Copied! Toggle word wrap Toggle overflow git remote add upstream https://github.com/windup/windup-quickstarts.git
$ git remote add upstream https://github.com/windup/windup-quickstarts.git
upstream
リポジトリーから最新のファイルを取得します。Copy to Clipboard Copied! Toggle word wrap Toggle overflow git fetch upstream
$ git fetch upstream
第3章 XML ルールの作成
3.1. XML ルールの構造
本セクションでは、XML ルールの基本構造を説明します。すべての XML ルールは、rulesets 内の要素として定義されます。詳細は、MTA XML rule schema を参照してください。
3.1.1. ルールセット
ルールセットとは、特定の移行領域をターゲットとする 1 つ以上のルールのグループです。これは <ruleset>
要素の基本構造です。
<ruleset id="UNIQUE_RULESET_ID">: これを MTA ルールセットとして定義し、一意のルールセット ID を指定します。
<metadata>: ルールセットに関するメタデータ。
- <description>: ルールセットの説明。
- <dependencies/>: このルールセットで必要なルールアドオンです。
- <sourceTechnology/>: ソーステクノロジー。
- <targetTechnology/>: ターゲットテクノロジー。
-
<overrideRules/>:
true
に設定した場合は、MTA で配布されるコアルールセットと同じ ID で、このルールセットのルールをオーバーライドします。ルールセット ID とルール id の両方がコアルールセット内のルールと一致する必要があり、ルールは無視されます。デフォルトはfalse
です。
<rules>: 個々のルールのセット。
<rule id="UNIQUE_RULE_ID">: ルールを定義して、一意の ID を指定します。ルール ID の一部としてルールセット ID を含めることが推奨されます (例:
UNIQUE_RULESET_ID_UNIQUE_RULE_ID
)。ルールセットには 1 つ以上のルールを定義できます。-
<when>: 照合する条件。
<when>
で使用できる要素の詳細については、when 条件の構文 を参照してください。 -
<perform>: ルール条件が一致したときに実行されるアクション。
<perform>
で使用できる要素の詳細については、perform アクション構文 を参照してください。 -
<otherwise>: ルール条件が一致しない場合に実行されるアクション。この要素は、
<perform>
要素と同じ子要素を取ります。 - <where>: パラメーターとして定義される文字列パターン。このパターンは、ルール定義の他の場所で使用できます。詳細については、Where 構文 を参照してください。
-
<when>: 照合する条件。
- <file-mapping/>: エクステンションをグラフタイプにマップします。
- <package-mapping/>: パッケージパターン (正規表現) から組織名にマッピングします。
3.1.2. 事前定義されたルール
MTA は、一般的な移行要件に事前定義されたルールを提供します。これらのコア MTA ルールは、MTA インストールの RHAMT_HOME/rules/migration-core/
にあります。
以下は、プロプライエタリーユーティリティークラスで一致するコア MTA ルールの例になります。
<?xml version="1.0"?> <ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="weblogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <metadata> <description> This ruleset provides analysis of WebLogic proprietary classes and constructs that may require individual attention when migrating to JBoss EAP 6+. </description> <dependencies> <addon id="org.jboss.windup.rules,windup-rules-javaee,2.0.1.Final" /> <addon id="org.jboss.windup.rules,windup-rules-java,2.0.0.Final" /> </dependencies> <sourceTechnology id="weblogic" /> <targetTechnology id="eap" versionRange="[6,)" /> <tag>reviewed-2015-06-02</tag> <tag>weblogic</tag> </metadata> <rules> ... <rule id="weblogic-02000"> <when> <javaclass references="weblogic.utils.StringUtils.{*}" /> </when> <perform> <hint title="WebLogic StringUtils usage" effort="1" category-id="mandatory"> <message>Replace with the `StringUtils` class from Apache Commons.</message> <link href="https://commons.apache.org/proper/commons-lang/" title="Apache Commons Lang" /> <tag>weblogic</tag> </hint> </perform> </rule> ... </rules> </ruleset>
<?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="weblogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<metadata>
<description>
This ruleset provides analysis of WebLogic proprietary classes and constructs that may require individual attention when migrating to JBoss EAP 6+.
</description>
<dependencies>
<addon id="org.jboss.windup.rules,windup-rules-javaee,2.0.1.Final" />
<addon id="org.jboss.windup.rules,windup-rules-java,2.0.0.Final" />
</dependencies>
<sourceTechnology id="weblogic" />
<targetTechnology id="eap" versionRange="[6,)" />
<tag>reviewed-2015-06-02</tag>
<tag>weblogic</tag>
</metadata>
<rules>
...
<rule id="weblogic-02000">
<when>
<javaclass references="weblogic.utils.StringUtils.{*}" />
</when>
<perform>
<hint title="WebLogic StringUtils usage" effort="1" category-id="mandatory">
<message>Replace with the `StringUtils` class from Apache Commons.</message>
<link href="https://commons.apache.org/proper/commons-lang/" title="Apache Commons Lang" />
<tag>weblogic</tag>
</hint>
</perform>
</rule>
...
</rules>
</ruleset>
3.2. 基本的な XML ルールの作成
本セクションでは、MTA XML ルールを作成する方法を説明します。これは、すでに MTA がインストールされていることを前提としています。インストール手順は、MTA の CLI ガイド を参照してください。
3.2.1. 基本的な XML ルールテンプレートの作成
MTA XML ルールは conditions および actions で設定され、以下のルールパターンを使用します。
when(condition) perform(action) otherwise(action)
when(condition)
perform(action)
otherwise(action)
以下の内容で、XML ルールの基本的な構文であるファイルを作成します。
MTA XML ルールファイルは、.windup.xml
または .rhamt.xml
拡張子を使用する必要があります。そうしないと、ルールは評価されません。
<?xml version="1.0"?> <ruleset id="unique-ruleset-id" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <metadata> <!-- Metadata about the rule including a description, source technology, target technology, and any add-on dependencies --> </metadata> <rules> <rule id="unique-ruleset-id-01000"> <when> <!-- Test a condition... --> </when> <perform> <!-- Perform this action when condition is satisfied --> </perform> <otherwise> <!-- Perform this action when condition is not satisfied --> </otherwise> </rule> <rules> </ruleset>
<?xml version="1.0"?>
<ruleset id="unique-ruleset-id"
xmlns="http://windup.jboss.org/schema/jboss-ruleset"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<metadata>
<!-- Metadata about the rule including a description,
source technology, target technology, and any
add-on dependencies -->
</metadata>
<rules>
<rule id="unique-ruleset-id-01000">
<when>
<!-- Test a condition... -->
</when>
<perform>
<!-- Perform this action when condition is satisfied -->
</perform>
<otherwise>
<!-- Perform this action when condition is not satisfied -->
</otherwise>
</rule>
<rules>
</ruleset>
3.2.2. ルールセットメタデータの作成
XML ルールセットの metadata
要素は、説明、ソーステクノロジーおよびターゲットテクノロジー、アドオンの依存関係などのルールセットに関する追加情報を提供します。メタデータによりタグの指定が可能になり、ルールセットに関する追加情報を提供できます。ルールセットメタデータの詳細については、XML ルールの構造 を参照してください。
ルール <metadata> の例
<ruleset id="unique-ruleset-id" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <metadata> <description> This is the description. </description> <dependencies> <addon id="org.jboss.windup.rules,windup-rules-javaee,2.0.1.Final"/> <addon id="org.jboss.windup.rules,windup-rules-java,2.0.0.Final"/> </dependencies> <sourceTechnology id="weblogic" versionRange="(10,12]"/> <sourceTechnology id="ejb" versionRange="(2,3]"/> <targetTechnology id="eap" versionRange="(5,6]"/> <targetTechnology id="ejb" versionRange="(2,3]"/> <tag>require-stateless</tag> <tag>require-nofilesystem-io</tag> <executeAfter>AfterRulesetId</executeAfter> <executeBefore>BeforeRulesetId</executeBefore> </metadata> <rules> ... </rules> </ruleset>
<ruleset id="unique-ruleset-id"
xmlns="http://windup.jboss.org/schema/jboss-ruleset"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<metadata>
<description>
This is the description.
</description>
<dependencies>
<addon id="org.jboss.windup.rules,windup-rules-javaee,2.0.1.Final"/>
<addon id="org.jboss.windup.rules,windup-rules-java,2.0.0.Final"/>
</dependencies>
<sourceTechnology id="weblogic" versionRange="(10,12]"/>
<sourceTechnology id="ejb" versionRange="(2,3]"/>
<targetTechnology id="eap" versionRange="(5,6]"/>
<targetTechnology id="ejb" versionRange="(2,3]"/>
<tag>require-stateless</tag>
<tag>require-nofilesystem-io</tag>
<executeAfter>AfterRulesetId</executeAfter>
<executeBefore>BeforeRulesetId</executeBefore>
</metadata>
<rules>
...
</rules>
</ruleset>
3.2.3. ルールの作成
個々のルールは <rules>
要素内に含まれ、1 つ以上の when 条件 と perform アクション で設定されます。
有効なルール構文は、XML rule schema を参照してください。
3.2.3.1. when 条件のルールを作成する
XML ルール <when>
要素は条件をテストします。以下は、有効な <when>
条件の一覧です。
要素 | 説明 |
---|---|
<and> | 標準の論理 and 演算子。 |
<filecontent> | ファイル内の文字列またはテキスト (プロパティーファイルなど) を検索します。 |
<file-mapping> | 内部に保存されているファイルモデルにファイル名を定義します。 |
<javaclass> | Java クラスで一致のテスト。 |
<javaclass-ignore> | 検出の処理で無視する javaclass を除外します。 |
<not> | 標準の論理 not 演算子。 |
<or> | 標準の論理 or 演算子。 |
<package-mapping> | 組織またはライブラリーにパッケージ名を定義します。 |
<project> | 依存関係などのプロジェクトの特性をテストします。 |
<true> | 常に一致します。 |
<xmlfile> | XML ファイルで一致をテストします。 |
特定の構文は、Java クラス、XML ファイル、プロジェクト、またはファイルコンテンツを評価するルールを作成するかどうかによって異なります。これについては、when 条件の構文 で詳しく説明しています。
3.2.3.2. ルール実行アクションの作成
XML ルール <perform>
要素は、条件が満たされるとアクションを実行します。このルールで許可される操作には、アプリケーションリソースの分類、移行手順のインラインヒント、移行情報へのリンク、およびプロジェクトライン項目の報告が含まれます。以下は、有効な <perform>
アクションの一覧です。
要素 | 説明 |
---|---|
<classification> | この操作は、ファイル全体に適用するためのメタデータを追加します。たとえば、Java クラスが JMS メッセージリスナーの場合、JMS メッセージリスナーというタイトルの分類を追加できます。ファイル全体に適用される情報がここに表示されます。また、エフォートレベルが設定されている場合、その情報はファイル全体に適用されます。 |
<hint> | この操作により、ファイル内の行にメタデータが追加されます。これにより、コードのセクションを移行するヒントまたはインライン情報が提供されます。 |
<iteration> | これは、ルール内で定義される暗黙的な変数または明示的な変数を繰り返し処理することを指定します。 |
<lineitem> | これは、アプリケーションの概要ページに表示される高レベルのメッセージを提供します。 |
<link> | これにより、移行タスクに関する詳細情報を提供する追加情報またはドキュメントへの HTML リンクが提供されます。 |
<xslt> | これは、XML ファイルの変換方法を指定します。 |
この構文については、perform アクション構文 で詳しく説明しています。
3.3. XML ルール構文
3.3.1. when 条件の構文
ルールの when
で許可される条件は、GraphOperation を拡張する必要があり、現在、Java クラス、XML ファイル、プロジェクト、およびファイルコンテンツの評価が含まれます。XML ルールは Java ベースのルールアドオンの後にモデル化されるため、関連する Java クラスの JavaDocs へのリンクは、その動作をよりよく理解するために提供されます。
完全な XML ルールスキーマは http://windup.jboss.org/schema/windup-jboss-ruleset.xsd にあります。
次のセクションでは、より一般的な XML when
ルール条件を説明します。
デフォルトでは、when
ルール条件が複数指定された場合に、ルールが一致するには、すべての条件が満たされる必要があります。
3.3.1.1. <javaclass> Syntax
3.3.1.1.1. 概要
<javaclass>
要素を使用して、インポート、メソッド、変数宣言、アノテーション、クラス実装、および Java クラスに関連する他の項目を検索します。<javaclass>
条件のより詳細な理解は、JavaClass クラスの JavaDoc を参照してください。
以下は、WebLogic 固有の Apache XML パッケージをテストするルールの例です。
<rule id="weblogic-03000"> <when> <javaclass references="weblogic.apache.xml.{*}" /> </when> <perform> <hint title="WebLogic Specific Apache XML Package" effort="1" category-id="mandatory"> <message> Code using this package should be replaced with code using the org.apache.xml package from [Apache Xerces](http://xerces.apache.org/). </message> </hint> </perform> </rule>
<rule id="weblogic-03000">
<when>
<javaclass references="weblogic.apache.xml.{*}" />
</when>
<perform>
<hint title="WebLogic Specific Apache XML Package" effort="1" category-id="mandatory">
<message>
Code using this package should be replaced with code using the org.apache.xml package from [Apache
Xerces](http://xerces.apache.org/).
</message>
</hint>
</perform>
</rule>
3.3.1.1.2. <javaclass> 要素の作成
3.3.1.1.2.1. <javaclass> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
references | CLASS_NAME | 一致するパッケージまたはクラス名。ワイルドカード文字を使用できます。この属性は必須です。 注記
パフォーマンス上の理由から、ワイルドカード文字を使用して参照を開始しないでください。たとえば、 references="weblogic.apache.xml.{*}"
|
matchesSource | STRING | 一致する正確な正規表現。これは、ハードコーディングされた文字列を区別する場合に便利です。この属性は必須です。 matchesSource="log4j.logger"
|
as | VARIABLE_NAME |
ルールに割り当てられた変数名。これにより、後で処理した参照として使用できるようになります。以下の as="MyEjbRule"
|
from | VARIABLE_NAME |
from="MyEjbRule"
|
in | PATH_FILTER | この正規表現 (regex) の命名パターンに一致する入力ファイルをフィルターします。ワイルドカード文字を使用できます。 in="{*}File1"
|
3.3.1.1.2.2. <javaclass> 子要素
子要素 | 説明 |
---|---|
<location> | 参照が Java クラスで見つかった場所。場所は、アノテーション、フィールドおよび変数宣言、インポート、およびメソッドを参照できます。有効な値の完全なリストは、TypeReferenceLocation の JavaDoc を参照してください。 <location>IMPORT</location>
|
<annotation-literal> | アノテーション内のリテラル値に一致します。
以下の例は <javaclass references="org.package.MyAnnotation"> <location>ANNOTATION</location> <annotation-literal name="myvalue" pattern="test"/> </javaclass>
この場合、 |
<annotation-type> | 特定のアノテーションタイプで一致します。アノテーション要素に対して照合されるサブ条件を指定できます。
以下の例は、 <javaclass references="java.util.Calendar"> <location>FIELD_DECLARATION</location> <annotation-type pattern="org.package.MyAnnotation"> <annotation-literal name="myvalue" pattern="test"/> </annotation-type> </javaclass>
|
<annotation-list> | アノテーション内の配列の項目で一致します。配列インデックスが指定されていない場合は、配列内の任意のアイテムに適用されると条件が一致します。この要素と照合するサブ条件を指定できます。
以下の例は <javaclass references="org.package.MyAnnotation" > <location>ANNOTATION</location> <annotation-list name="mylist"> <annotation-literal pattern="two"/> </annotation-list> </javaclass>
この場合、 |
3.3.1.2. <xmlfile> 構文
3.3.1.2.1. 概要
<xmlfile>
要素を使用して XML ファイルで情報を検索します。<xmlfile>
条件の理解を深めるには、XmlFile クラスの JavaDoc を参照してください。
以下は、XML ファイルをテストするルールの例です。
<rule id="UNIQUE_RULE_ID"> <when> <xmlfile matches="/w:web-app/w:resource-ref/w:res-auth[text() = 'Container']"> <namespace prefix="w" uri="http://java.sun.com/xml/ns/javaee"/> </xmlfile> </when> <perform> <hint title="Title for Hint from XML"> <message>Container Auth</message> </hint> <xslt description="Example XSLT Conversion" extension="-converted-example.xml" template="/exampleconversion.xsl"/> </perform> </rule>
<rule id="UNIQUE_RULE_ID">
<when>
<xmlfile matches="/w:web-app/w:resource-ref/w:res-auth[text() = 'Container']">
<namespace prefix="w" uri="http://java.sun.com/xml/ns/javaee"/>
</xmlfile>
</when>
<perform>
<hint title="Title for Hint from XML">
<message>Container Auth</message>
</hint>
<xslt description="Example XSLT Conversion" extension="-converted-example.xml"
template="/exampleconversion.xsl"/>
</perform>
</rule>
3.3.1.2.2. <xmlfile> 要素の作成
3.3.1.2.2.1. <xmlfile> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
matches | XPATH | XML ファイル条件で一致します。 matches="/w:web-app/w:resource-ref/w:res-auth[text() = 'Container']"
|
xpathResultMatch | XPATH_RESULT_STRING | 指定の正規表現に一致する結果を返します。 <xmlfile matches="//foo/text()" xpathResultMatch="Text from foo."/>
|
as | VARIABLE_NAME |
ルールに割り当てられた変数名。これにより、後で処理した参照として使用できるようになります。以下の as="MyEjbRule"
|
in | PATH_FILTER | この正規表現 (regex) の命名パターンに一致する入力ファイルをフィルターを設定するのに使用されます。ワイルドカード文字を使用できます。 in="{*}File1"
|
from | VARIABLE_NAME |
from="MyEjbRule"
|
public-id | PUBLIC_ID | DTD public-id 正規表現。 public-id="public"
|
3.3.1.2.2.2. <xmlfile> がカスタム関数と matches
します。
matches
属性は、ルール変数スタックに一致した値の設定など、有用な影響を及ぼす可能性のある組み込みのカスタム XPath 関数をいくつか使用できます。
機能 | 説明 |
---|---|
| XPath 式を文字列と照合します。MTA パラメーター化プレースホルダーが含まれている可能性があります。 matches="windup:matches(//foo/@class, '{javaclassname}'"
これは、すべての |
3.3.1.2.2.3. <xmlfile> 子要素
子要素 | 説明 |
---|---|
<namespace> |
XML ファイルで参照される名前空間。この要素には、 <namespace prefix="abc" uri="http://maven.apache.org/POM/4.0.0"/>
|
3.3.1.3. <project> 構文
3.3.1.3.1. 概要
<project>
要素を使用して、プロジェクトの特性について Maven POM ファイルをクエリーします。<project>
条件をよりよく理解するには、Project クラスの JavaDoc を参照してください。
以下は、2.0.0.Final と 2.2.0.Final の間で JUnit 依存関係バージョンを確認するルールの例になります。
<rule id="UNIQUE_RULE_ID"> <when> <project> <artifact groupId="junit" artifactId="junit" fromVersion="2.0.0.Final" toVersion="2.2.0.Final"/> </project> </when> <perform> <lineitem message="The project uses junit with the version between 2.0.0.Final and 2.2.0.Final"/> </perform> </rule>
<rule id="UNIQUE_RULE_ID">
<when>
<project>
<artifact groupId="junit" artifactId="junit" fromVersion="2.0.0.Final" toVersion="2.2.0.Final"/>
</project>
</when>
<perform>
<lineitem message="The project uses junit with the version between 2.0.0.Final and 2.2.0.Final"/>
</perform>
</rule>
3.3.1.3.2. <project> 要素の作成
3.3.1.3.2.1. <project> 要素属性
<project>
要素は、プロジェクトの Maven POM ファイルと照合するために使用されます。この条件を使用して、プロジェクトの依存関係をクエリーできます。属性自体はありません。
3.3.1.3.2.2. <project> 子要素
子要素 | 説明 |
---|---|
<artifact> |
プロジェクトの依存関係に対してクエリーするために |
3.3.1.3.2.3. <artifact> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
groupId | PROJECT_GROUP_ID |
依存関係の |
artifactId | PROJECT_ARTIFACT_ID |
依存関係の |
fromVersion | FROM_VERSION |
アーティファクトの下位バージョンバインドを指定します。例: |
toVersion | TO_VERSION |
アーティファクトの上位バージョンバインドを指定します。例: |
3.3.1.4. <filecontent> 構文
3.3.1.4.1. 概要
<filecontent>
要素を使用して、ファイル内の文字列またはテキストを検索します (例: Properties ファイルの行)。<filecontent>
条件のより詳細な理解は、FileContent クラスの JavaDoc を参照してください。
3.3.1.4.2. <filecontent> の作成
3.3.1.4.2.1. <filecontent> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
pattern | String | 指定されたパラメーター化された文字列に対してファイルの内容を一致させます。この属性は必須です。 |
filename | String | 提供されるパラメーター化された文字列に対してファイル名を一致させます。 |
as | VARIABLE_NAME |
ルールに割り当てられた変数名。これにより、後で処理した参照として使用できるようになります。以下の as="MyEjbRule"
|
from | VARIABLE_NAME |
from="MyEjbRule"
|
3.3.1.5. <file> 構文
3.3.1.5.1. 概要
<file>
要素を使用して、特定の名前のファイル (例: ibm-webservices-ext.xmi
) ファイルが存在するかどうかを検索します。<file>
条件のより詳細な理解は、File クラスの JavaDoc を参照してください。
3.3.1.5.2. <file> 要素の作成
3.3.1.5.2.1. <file> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
filename | String | 提供されるパラメーター化された文字列に対してファイル名を一致させます。この属性は必須です。 |
as | VARIABLE_NAME |
ルールに割り当てられた変数名。これにより、後で処理した参照として使用できるようになります。以下の as="MyEjbRule"
|
from | VARIABLE_NAME |
以下に例を示します。 from="MyEjbRule"
|
3.3.1.6. <has-hint> 構文
3.3.1.6.1. 概要
<has-hint>
要素を使用して、ファイルまたは行にすでに関連付けられているヒントがあるかどうかをテストします。これは主に、ヒントがすでに存在する場合に起動を防止するため、また他の条件が適用されない場合のデフォルト実行のルールを実装するために使用されます。<has-hint>
条件のより詳しい情報は、HasHint クラスの JavaDoc を参照してください。
以下は、IBM JMS 宛先メッセージのヒントが存在するかどうかを確認し、含まれていない場合にそれを含めるルールの例です。
<rule id="websphere-jms-eap7-03000"> <when> <javaclass references="{package}.{prefix}{type}Message" /> </when> <perform> <iteration> <when> <not> <has-hint /> </not> </when> <perform> <hint title="IBM JMS destination message" effort="1" category-id="mandatory"> <message> JMS `{package}.{prefix}{type}Message` messages represent the actual data passed through JMS destinations. This reference should be replaced with the Java EE standard API `javax.jms.{type}Message`. </message> <link href="https://docs.oracle.com/javaee/7/tutorial/jms-concepts003.htm#sthref2271" title="Java EE 7 JMS Tutorial - Message API" /> <tag>jms</tag> <tag>websphere</tag> </hint> </perform> </iteration> </perform> <where param="type"> <matches pattern="(Text|Stream|Object|Map|Bytes)?" /> </where> <where param="prefix"> <matches pattern="(JMS|MQe|MQ)" /> </where> <where param="package"> <matches pattern="com.ibm(\..*)?\.jms" /> </where> </rule>
<rule id="websphere-jms-eap7-03000">
<when>
<javaclass references="{package}.{prefix}{type}Message" />
</when>
<perform>
<iteration>
<when>
<not>
<has-hint />
</not>
</when>
<perform>
<hint title="IBM JMS destination message" effort="1" category-id="mandatory">
<message>
JMS `{package}.{prefix}{type}Message` messages represent the actual data passed through JMS destinations. This reference should be
replaced with the Java EE standard API `javax.jms.{type}Message`.
</message>
<link href="https://docs.oracle.com/javaee/7/tutorial/jms-concepts003.htm#sthref2271" title="Java EE 7 JMS Tutorial - Message API" />
<tag>jms</tag>
<tag>websphere</tag>
</hint>
</perform>
</iteration>
</perform>
<where param="type">
<matches pattern="(Text|Stream|Object|Map|Bytes)?" />
</where>
<where param="prefix">
<matches pattern="(JMS|MQe|MQ)" />
</where>
<where param="package">
<matches pattern="com.ibm(\..*)?\.jms" />
</where>
</rule>
3.3.1.6.2. <has-hint> の作成
<has-hint>
要素は、ファイルまたは行のヒントが存在するかどうかを判断するために使用されます。子要素はありません。
3.3.1.6.2.1. <has-hint> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
message | String | ヒントを提供されたメッセージ文字列と照合できるようにする任意の引数。 |
3.3.1.7. <has-classification> 構文
3.3.1.7.1. 概要
<has-classification>
要素を使用して、ファイルまたは行に分類があるかどうかをテストします。これは主に、分類がすでに存在する場合に起動を防止するため、また他の条件が適用されない場合のデフォルト実行のルールを実装するために使用されます。<has-classification>
条件のより詳細な理解は、HasClassification クラスの JavaDoc を参照してください。
3.3.1.7.2. <has-classification> の作成
has-classification
要素は、指定された分類が存在するかどうかを判断するために使用されます。子要素はありません。
3.3.1.7.2.1. <has-classification> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
title | String | 分類と照合する任意のタイトル。 |
3.3.1.8. <graph-query> 構文
3.3.1.8.1. 概要
<graph-query>
要素を使用して、生成されたグラフで任意の要素を検索します。この要素は、主に特定のアーカイブを検索するために使用されます。<graph-query>
条件のより詳細な理解は、QueryHandler クラスの JavaDoc を参照してください。
以下は、ehcache
パッケージが見つかったかどうかを判断するためにテストするルールの例です。
<rule id="embedded-cache-libraries-01000"> <when> <graph-query discriminator="JarArchiveModel"> <property name="fileName" searchType="regex">.*ehcache.*\.jar$</property> </graph-query> </when> <perform> <classification title="Caching - Ehcache embedded library" category-id="cloud-mandatory" effort="5"> <description> The application embeds an Ehcache library. Cloud readiness issue as potential state information that is not persisted to a backing service. </description> </classification> <technology-tag level="INFORMATIONAL">Ehcache (embedded)</technology-tag> </perform> </rule>
<rule id="embedded-cache-libraries-01000">
<when>
<graph-query discriminator="JarArchiveModel">
<property name="fileName" searchType="regex">.*ehcache.*\.jar$</property>
</graph-query>
</when>
<perform>
<classification title="Caching - Ehcache embedded library" category-id="cloud-mandatory" effort="5">
<description>
The application embeds an Ehcache library.
Cloud readiness issue as potential state information that is not persisted to a backing service.
</description>
</classification>
<technology-tag level="INFORMATIONAL">Ehcache (embedded)</technology-tag>
</perform>
</rule>
3.3.1.8.2. <graph-query> の作成
3.3.1.8.2.1. <graph-query> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
discriminator | MODEL_TYPE |
検索に使用するモデルのタイプ。これは任意の有効なモデルにすることができます。ただし、アーカイブの調査には |
as | VARIABLE_NAME |
ルールに割り当てられた変数名。これにより、後で処理した参照として使用できるようになります。以下の as="MyEjbRule"
|
from | VARIABLE_NAME |
from="MyEjbRule"
|
3.3.1.8.2.2. <graph-query> プロパティー
プロパティー名 | タイプ | 説明 |
---|---|---|
name | String |
選択したモデル内で照合する属性の名前。ファイルベースのモデルを使用する場合は、 |
type | property-type |
予想されるプロパティーの型 ( |
searchType | property-search-type |
条件の一致方法を定義します。 |
3.3.2. perform アクション構文
ルールの perform
セクションで利用可能な操作には、アプリケーションリソースの分類、移行手順のインラインヒント、移行情報へのリンク、およびプロジェクトラインレポートレポートが含まれます。XML ルールは Java ベースのルールアドオンの後にモデル化されるため、関連する Java クラスの JavaDocs へのリンクは、その動作をよりよく理解するために提供されます。
完全な XML ルールスキーマは http://windup.jboss.org/schema/windup-jboss-ruleset.xsd にあります。
次のセクションでは、より一般的な XML ルール実行アクションを説明します。
3.3.2.1. <classification> 構文
3.3.2.1.1. 概要
<classification>
要素は、ルールに一致するアプリケーションリソースを識別または分類するのに使用されます。これは、レポートに表示されるタイトル、作業レベル、およびリソースの分類の移行方法に関する追加情報へのリンクも提供します。<classification>
アクションの詳細は、Classification クラスの JavaDoc を参照してください。
以下は、リソースを WebLogic EAR アプリケーションデプロイメント記述子ファイルとして分類するルールの例です。
<rule id="XmlWebLogicRules_10vvyf"> <when> <xmlfile as="default" matches="/*[local-name()='weblogic-application']"></xmlfile> </when> <perform> <iteration> <classification title="Weblogic EAR Application Descriptor" effort="3"/> </iteration> </perform> </rule>
<rule id="XmlWebLogicRules_10vvyf">
<when>
<xmlfile as="default" matches="/*[local-name()='weblogic-application']"></xmlfile>
</when>
<perform>
<iteration>
<classification title="Weblogic EAR Application Descriptor" effort="3"/>
</iteration>
</perform>
</rule>
3.3.2.1.2. <classification> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
title | STRING | このリソースに指定されたタイトル。この属性は必須です。 title="JBoss Seam Components"
|
effort | BYTE | このリソースに割り当てられた作業量レベル。 effort="2"
|
category-id | STRING |
category-id="mandatory"
|
/ | VARIABLE_NAME | 指定の参照用に新しい分類を作成します。 of="MySeamRule"
|
3.3.2.1.3. <classification> 子要素
子要素 | 説明 |
---|---|
<link> | 詳細情報のリンク URI およびテキストタイトルを提供します。 <classification title="Websphere Startup Service" effort="4"> <link href="http://docs.oracle.com/javaee/6/api/javax/ejb/Singleton.html" title="EJB3.1 Singleton Bean"/> <link href="http://docs.oracle.com/javaee/6/api/javax/ejb/Startup.html" title="EJB3.1 Startup Bean"/> </classification>
|
<tag> | 分類に関する追加のカスタム情報を提供します。 <tag>Seam3</tag>
|
<description> | このリソースの説明 <description>JBoss Seam components must be replaced</description>
|
3.3.2.2. <link> 構文
3.3.2.2.1. 概要
<link>
要素は、分類またはヒントで使用され、情報コンテンツへのリンクが提供されます。<link>
アクションのより詳細な理解は、Link クラスの JavaDoc を参照してください。
以下は、追加情報へのリンクを作成するルールの例です。
<rule id="SeamToCDIRules_2fmb"> <when> <javaclass references="org.jboss.seam.{*}" as="default"/> </when> <perform> <iteration> <classification title="SEAM Component" effort="1"> <link href="http://www.seamframework.org/Seam3/Seam2ToSeam3MigrationNotes" title="Seam 2 to Seam 3 Migration Notes"/> <link href="http://docs.jboss.org/weld/reference/latest/en-US/html/example.html" title="JSF Web Application Example"/> <link href="http://docs.jboss.org/weld/reference/latest/en-US/html/contexts.html" title="JBoss Context Documentation"/> <link href="http://www.andygibson.net/blog/tutorial/cdi-conversations-part-2/" title="CDI Conversations Blog Post"/> </classification> </iteration> </perform> </rule>
<rule id="SeamToCDIRules_2fmb">
<when>
<javaclass references="org.jboss.seam.{*}" as="default"/>
</when>
<perform>
<iteration>
<classification title="SEAM Component" effort="1">
<link href="http://www.seamframework.org/Seam3/Seam2ToSeam3MigrationNotes" title="Seam 2 to Seam 3 Migration Notes"/>
<link href="http://docs.jboss.org/weld/reference/latest/en-US/html/example.html" title="JSF Web Application Example"/>
<link href="http://docs.jboss.org/weld/reference/latest/en-US/html/contexts.html" title="JBoss Context Documentation"/>
<link href="http://www.andygibson.net/blog/tutorial/cdi-conversations-part-2/" title="CDI Conversations Blog Post"/>
</classification>
</iteration>
</perform>
</rule>
3.3.2.2.2. <link> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
href | URI | 参照リンクの URI。 href="https://access.redhat.com/articles/1249423"
|
title | STRING | リンクのタイトル。 title="Migrate WebLogic Proprietary Servlet Annotations"
|
3.3.2.3. <hint> 構文
3.3.2.3.1. 概要
<hint>
要素は、コードのセクションの移行方法に関するヒントまたはインライン情報を提供するために使用されます。<hint>
アクションについてよく理解するには、Hint クラスの JavaDoc を参照してください。
以下は、ヒントを作成するルールの例です。
<rule id="WebLogicWebServiceRules_8jyqn"> <when> <javaclass references="weblogic.wsee.connection.transport.http.HttpTransportInfo.setUsername({*})" as="default"> <location>METHOD</location> </javaclass> </when> <perform> <iteration> <hint title="Proprietary web-service" category-id="mandatory" effort="3"> <message>Replace proprietary web-service authentication with JAX-WS standards.</message> <link href="http://java-x.blogspot.com/2009/03/invoking-web-services-through-proxy.html" title="JAX-WS Proxy Password Example"/> </hint> </iteration> </perform> </rule>
<rule id="WebLogicWebServiceRules_8jyqn">
<when>
<javaclass references="weblogic.wsee.connection.transport.http.HttpTransportInfo.setUsername({*})" as="default">
<location>METHOD</location>
</javaclass>
</when>
<perform>
<iteration>
<hint title="Proprietary web-service" category-id="mandatory" effort="3">
<message>Replace proprietary web-service authentication with JAX-WS standards.</message>
<link href="http://java-x.blogspot.com/2009/03/invoking-web-services-through-proxy.html" title="JAX-WS Proxy Password Example"/>
</hint>
</iteration>
</perform>
</rule>
3.3.2.3.2. <hint> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
title | STRING | 指定された文字列を使用してこのヒントを入力します。この属性は必須です。 title="JBoss Seam Component Hint"
|
category-id | STRING |
category-id="mandatory"
|
in | VARIABLE_NAME | 指定された変数によって解決される FileLocationModel に新しいヒントを作成します。 in="Foo"
|
effort | BYTE | このリソースに割り当てられた作業量レベル。 effort="2"
|
3.3.2.3.3. <hint> 子要素
子要素 | 説明 |
---|---|
<message> | 移行ヒントを記述するメッセージ。 <message>EJB 2.0 is deprecated</message>
|
<link> | 情報コンテンツへのリンクを特定または分類します。詳細については、<link> 構文 のセクションを参照してください。 <link href="http://docs.oracle.com/javaee/6/api/" title="Java Platform, Enterprise Edition 6 API Specification" />
|
<tag> |
この <tag>Needs review</tag>
|
<quickfix> | ルール条件を満たす際に迅速な修正を実行するために Eclipse プラグインによって使用される情報が含まれています。 <quickfix name="slink-qf" type="REPLACE"> <replacement>h:link</replacement> <search>s:link</search> </quickfix>
|
3.3.2.4. <xslt> Syntax
3.3.2.4.1. 概要
<xslt>
要素は XML ファイルの変換方法を指定します。<xslt>
アクションのより詳しい情報は、XSLTTransformation クラスの JavaDoc を参照してください。
以下は、XSLT アクションを定義するルールの例です。
<rule id="XmlWebLogicRules_6bcvk"> <when> <xmlfile as="default" matches="/weblogic-ejb-jar"/> </when> <perform> <iteration> <classification title="Weblogic EJB XML" effort="3"/> <xslt title="JBoss EJB Descriptor (Windup-Generated)" template="transformations/xslt/weblogic-ejb-to-jboss.xsl" extension="-jboss.xml"/> </iteration> </perform> </rule>
<rule id="XmlWebLogicRules_6bcvk">
<when>
<xmlfile as="default" matches="/weblogic-ejb-jar"/>
</when>
<perform>
<iteration>
<classification title="Weblogic EJB XML" effort="3"/>
<xslt title="JBoss EJB Descriptor (Windup-Generated)" template="transformations/xslt/weblogic-ejb-to-jboss.xsl" extension="-jboss.xml"/>
</iteration>
</perform>
</rule>
3.3.2.4.2. <xslt> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
title | STRING | レポート内のこの XSLTTransformation のタイトルを設定します。この属性は必須です。 title="XSLT Transformed Output"
|
/ | STRING | 指定の参照の変換を新たに作成します。 of="testVariable_instance"
|
extension | STRING | この XSLTTransformation のエクステンションを設定します。この属性は必須です。 extension="-result.html"
|
template | STRING | XML テンプレートを設定します。この属性は必須です。 template="simpleXSLT.xsl"
|
effort | BYTE | 変換に必要な作業量レベル。 |
3.3.2.4.3. <xslt> 子要素
子要素 | 説明 |
---|---|
<xslt-parameter> | XSLTTransformation パラメーターをプロパティー値のペアとして指定 <xslt-parameter property="title" value="EJB Transformation"/>
|
3.3.2.4.3.1. <lineitem> 構文
3.3.2.4.4. 概要
<lineitem>
要素は、非推奨のライブラリーを置き換える必要や、潜在的なクラスの読み込み問題を解決する必要がある場合など、アプリケーションの一般的な移行要件を提供するために使用されます。この情報は、プロジェクトまたはアプリケーションの概要ページに表示されます。<lineitem>
アクションについてよく理解するには、LineItem クラスの JavaDoc を参照してください。
以下は、行項目メッセージを作成するルールの例です。
<rule id="weblogic_servlet_annotation_1000"> <when> <javaclass references="weblogic.servlet.annotation.WLServlet" as="default"> <location>ANNOTATION</location> </javaclass> </when> <perform> <hint effort="1"> <message>Replace the proprietary WebLogic @WLServlet annotation with the Java EE 6 standard @WebServlet annotation.</message> <link href="https://access.redhat.com/articles/1249423" title="Migrate WebLogic Proprietary Servlet Annotations" /> <lineitem message="Proprietary WebLogic @WLServlet annotation found in file."/> </hint> </perform> </rule>
<rule id="weblogic_servlet_annotation_1000">
<when>
<javaclass references="weblogic.servlet.annotation.WLServlet" as="default">
<location>ANNOTATION</location>
</javaclass>
</when>
<perform>
<hint effort="1">
<message>Replace the proprietary WebLogic @WLServlet annotation with the Java EE 6 standard @WebServlet annotation.</message>
<link href="https://access.redhat.com/articles/1249423" title="Migrate WebLogic Proprietary Servlet Annotations" />
<lineitem message="Proprietary WebLogic @WLServlet annotation found in file."/>
</hint>
</perform>
</rule>
3.3.2.4.5. <lineitem> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
message | STRING | 行項目メッセージ。 message="Proprietary code found."
|
3.3.2.5. <iteration> 構文
3.3.2.5.1. 概要
<iteration>
要素は、ルール内で定義される暗黙的な変数または明示的な変数を繰り返し処理するように指定します。<iteration>
アクションについてよく理解するには、Iteration の JavaDoc を参照してください。
以下は、反復を実行するルールの例です。
<rule id="jboss-eap5-xml-19000"> <when> <xmlfile as="jboss-app" matches="/jboss-app"/> <xmlfile as="jboss-app-no-DTD" matches="/jboss-app" public-id=""/> </when> <perform> <iteration over="jboss-app"> <classification title="JBoss application Descriptor" effort="5"/> </iteration> <iteration over="jboss-app-no-DTD"> <classification title="JBoss application descriptor with missing DTD" effort="5"/> </iteration> <iteration over="jboss-app-no-DTD"> <xslt title="JBoss application descriptor - JBoss 5 (Windup-generated)" template="transformations/xslt/jboss-app-to-jboss5.xsl" extension="-jboss5.xml"/> </iteration> </perform> </rule>
<rule id="jboss-eap5-xml-19000">
<when>
<xmlfile as="jboss-app" matches="/jboss-app"/>
<xmlfile as="jboss-app-no-DTD" matches="/jboss-app" public-id=""/>
</when>
<perform>
<iteration over="jboss-app">
<classification title="JBoss application Descriptor" effort="5"/>
</iteration>
<iteration over="jboss-app-no-DTD">
<classification title="JBoss application descriptor with missing DTD" effort="5"/>
</iteration>
<iteration over="jboss-app-no-DTD">
<xslt title="JBoss application descriptor - JBoss 5 (Windup-generated)" template="transformations/xslt/jboss-app-to-jboss5.xsl" extension="-jboss5.xml"/>
</iteration>
</perform>
</rule>
3.3.2.5.2. <iteration> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
over | VARIABLE_NAME | この VARIABLE_NAME で特定された条件を繰り返します。 over="jboss-app"
|
3.3.2.5.3. <iteration> 子要素
子要素 | 説明 |
---|---|
<iteration> |
子要素には、 |
3.3.3. where 構文
XML ルールの他の要素で使用する、一致するパターンを指定するパラメーターを定義できます。これにより、複雑なマッチング式のパターンを単純化することができます。
<where>
要素を使用してパラメーターを定義します。param
属性を使用してパラメーター名を指定し、<matches>
要素を使用してパターンを指定します。このパラメーターは、構文 {PARAM_NAME}
を使用して、ルール定義の他の場所で参照できます。
完全な XML ルールスキーマは http://windup.jboss.org/schema/windup-jboss-ruleset.xsd にあります。
以下のルール例は、(activeio|activemq)
パターンを指定する subpackage
という名前のパラメーターを定義します。
<rule id="generic-catchall-00600"> <when> <javaclass references="org.apache.{subpackage}.{*}"> </javaclass> </when> <perform> ... </perform> <where param="subpackage"> <matches pattern="(activeio|activemq)" /> </where> </rule>
<rule id="generic-catchall-00600">
<when>
<javaclass references="org.apache.{subpackage}.{*}">
</javaclass>
</when>
<perform>
...
</perform>
<where param="subpackage">
<matches pattern="(activeio|activemq)" />
</where>
</rule>
subpackage
で定義されたパターンは <javaclass>
references
属性で置き換えられます。これにより、ルールは org.apache.activeio.*
パッケージおよび org.apache.activemq.*
パッケージで一致します。
3.4. Migration Toolkit for Applications へのルールの追加
Migration Toolkit for Applications ルールは、ルールを適切な MTA ディレクトリーにコピーしてインストールされます。MTA は、次の場所にあるルール (.windup.xml
または .rhamt.xml
で終わるファイル) をスキャンします。
-
MTA コマンドラインで
--userRulesDirectory
引数で指定されたディレクトリー。 -
RHAMT_HOME/rules/
ディレクトリー。RHAMT_HOME
は、Migration Toolkit for Applications 実行可能ファイルをインストールし、実行するディレクトリーです。 ${user.home}/.rhamt/rules/
ディレクトリー。このディレクトリーは、最初に実行された時点で MTA により作成されます。これには、ルール、アドオン、および MTA ログが含まれます。注記Windows の場合、このディレクトリーは
\Documents and Settings\USER_NAME\.rhamt\rules\
または\Users\USER_NAME\.rhamt\rules\
になります。
第4章 XML ルールのテスト
4.1. テストルールの作成
ルールを作成したら、テストルールを作成して、機能が期待どおりであることを確認することをお勧めします。テストルールは、XML ルールの作成 と同様のプロセスを使用して作成されますが、次の違いがあります。
-
テストルールは、テストするルールの下にある
tests/
ディレクトリーに置く必要があります。 -
テストクラスなどのデータは、
tests/
ディレクトリーの下のdata/
ディレクトリーに配置する必要があります。 -
テストルールでは、
.rhamt.test.xml
拡張子を使用する必要があります。 - これらのルールは、テスト XML ルール構造 で定義された構造を使用します。
さらに、テストするルールの名前に続くテストルールを作成することが推奨されます。たとえば、ファイル名 proprietary-rule.rhamt.xml
でルールを作成した場合、テストルールは proprietary-rule.rhamt.test.xml
と呼ばれます。
4.1.1. XML ルール構造のテスト
すべてのテスト XML ルールは、1 つ以上のルールセット rulesets
を含む ruletests
内の要素として定義されます。詳細は、MTA XML rule schema を参照してください。
ルールテストは、移行の特定の領域を対象とする 1 つ以上のテストのグループです。これは <ruletest>
要素の基本構造です。
<ruletest id="RULE_TOPIC-test">
: 一意の MTA ルールテストとして定義し、固有のルールテスト ID を提供します。-
<testDataPath>
: テストに使用するクラスやファイルなどのデータへのパスを定義します。 -
<sourceMode>
: データで渡されたにソースファイルのみが含まれるかどうかを示します。EAR、WAR、JAR などのアーカイブが使用されている場合は、false
に設定する必要があります。デフォルトはtrue
です。 -
<rulePath>
: テストされるルールへのパス。これは、テストするルールの名前で終了します。 -
<ruleset>
: テストケースのロジックが含まれるルールセット。これらは ルールセット で定義されるものと同じです。
-
4.1.2. XML ルール構文のテスト
XML ルール構文 のタグに加え、以下の when
条件がテストルールの作成に一般的に使用されます。
perform アクション構文 のタグのほかに、以下の perform
条件がテストルールのアクションとして一般的に使用されます。
4.1.2.1. <not> 構文
概要
<not>
要素は標準の論理演算子 not で 、通常は条件を満たさない場合に <fail>
を実行するために使用されます。
以下は、分析の最後に特定のメッセージのみが存在する場合に失敗したテストルールの例です。
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="proprietary-servlet-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <testDataPath>data/</testDataPath> <rulePath>../proprietary-servlet.rhamt.xml</rulePath> <ruleset> <rules> <rule id="proprietary-servlet-01000-test"> <when> <!-- The <not> will perform a logical not operator on the elements within. --> <not> <!-- The defined <iterable-filter> has a size of 1. This rule will only match on a single instance of the defined hint. --> <iterable-filter size="1"> <hint-exists message="Replace the proprietary @ProprietaryServlet annotation with the Java EE 7 standard @WebServlet annotation*" /> </iterable-filter> </not> </when> <!-- This <perform> element is only executed if the previous <when> condition is false. This ensures that it only executes if there is not a single instance of the defined hint. --> <perform> <fail message="Hint for @ProprietaryServlet was not found!" /> </perform> </rule> </rules> </ruleset> </ruletest>
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset"
id="proprietary-servlet-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<testDataPath>data/</testDataPath>
<rulePath>../proprietary-servlet.rhamt.xml</rulePath>
<ruleset>
<rules>
<rule id="proprietary-servlet-01000-test">
<when>
<!--
The <not> will perform a logical not operator on the elements within.
-->
<not>
<!--
The defined <iterable-filter> has a size of 1. This rule will only match on a single instance of the defined hint.
-->
<iterable-filter size="1">
<hint-exists message="Replace the proprietary @ProprietaryServlet annotation with the Java EE 7 standard @WebServlet annotation*" />
</iterable-filter>
</not>
</when>
<!--
This <perform> element is only executed if the previous <when> condition is false.
This ensures that it only executes if there is not a single instance of the defined hint.
-->
<perform>
<fail message="Hint for @ProprietaryServlet was not found!" />
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
<not>
要素には固有の属性や子要素がありません。
4.1.2.2. <iterable-filter> 構文
概要
<iterable-filter>
要素は、条件の検証回数をカウントします。詳細は、IterableFilter クラスを参照してください。
以下は、指定のメッセージの 4 つのインスタンスを検索する例です。
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="proprietary-servlet-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <testDataPath>data/</testDataPath> <rulePath>../proprietary-servlet.rhamt.xml</rulePath> <ruleset> <rules> <rule id="proprietary-servlet-03000-test"> <when> <!-- The <not> will perform a logical not operator on the elements within. --> <not> <!-- The defined <iterable-filter> has a size of 4. This rule will only match on four instances of the defined hint. --> <iterable-filter size="4"> <hint-exists message="Replace the proprietary @ProprietaryInitParam annotation with the Java EE 7 standard @WebInitParam annotation*" /> </iterable-filter> </not> </when> <!-- This <perform> element is only executed if the previous <when> condition is false. In this configuration, it only executes if there are not four instances of the defined hint. --> <perform> <fail message="Hint for @ProprietaryInitParam was not found!" /> </perform> </rule> </rules> </ruleset> </ruletest>
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset"
id="proprietary-servlet-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<testDataPath>data/</testDataPath>
<rulePath>../proprietary-servlet.rhamt.xml</rulePath>
<ruleset>
<rules>
<rule id="proprietary-servlet-03000-test">
<when>
<!--
The <not> will perform a logical not operator on the elements within.
-->
<not>
<!--
The defined <iterable-filter> has a size of 4. This rule will only match on four instances of the defined hint.
-->
<iterable-filter size="4">
<hint-exists message="Replace the proprietary @ProprietaryInitParam annotation with the Java EE 7 standard @WebInitParam annotation*" />
</iterable-filter>
</not>
</when>
<!--
This <perform> element is only executed if the previous <when> condition is false.
In this configuration, it only executes if there are not four instances of the defined hint.
-->
<perform>
<fail message="Hint for @ProprietaryInitParam was not found!" />
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
<iterable-filter>
要素には一意の子要素がありません。
<iterable-filter> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
size | integer | 検証される回数。 |
4.1.2.3. <classification-exists> 構文
<classification-exists>
要素は、分析に特定の分類タイトルが含まれているかどうかを判断します。詳細は、ClassificationExists クラスを参照してください。
特殊文字 ([
、'
など) が含まれるメッセージをテストする場合は、各特殊文字をバックスラッシュ (\
) でエスケープして正しく一致させる必要があります。
以下は、特定の分類タイトルを検索する例です。
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="proprietary-servlet-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <testDataPath>data/</testDataPath> <rulePath>../weblogic.rhamt.xml</rulePath> <ruleset> <rules> <rule id="weblogic-01000-test"> <when> <!-- The <not> will perform a logical not operator on the elements within. --> <not> <!-- The defined <classification-exists> is attempting to match on the defined title. This classification would have been generated by a matching <classification title="WebLogic scheduled job" .../> rule. --> <classification-exists classification="WebLogic scheduled job" /> </not> </when> <!-- This <perform> element is only executed if the previous <when> condition is false. In this configuration, it only executes if there is not a matching classification. --> <perform> <fail message="Triggerable not found" /> </perform> </rule> </rules> </ruleset> </ruletest>
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset"
id="proprietary-servlet-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<testDataPath>data/</testDataPath>
<rulePath>../weblogic.rhamt.xml</rulePath>
<ruleset>
<rules>
<rule id="weblogic-01000-test">
<when>
<!--
The <not> will perform a logical not operator on the elements within.
-->
<not>
<!--
The defined <classification-exists> is attempting to match on the defined title.
This classification would have been generated by a matching <classification title="WebLogic scheduled job" .../> rule.
-->
<classification-exists classification="WebLogic scheduled job" />
</not>
</when>
<!--
This <perform> element is only executed if the previous <when> condition is false.
In this configuration, it only executes if there is not a matching classification.
-->
<perform>
<fail message="Triggerable not found" />
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
<classification-exists>
には一意の子要素がありません。
<classification-exists> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
classification | String |
検索する |
in | String | 定義されたファイル名が含まれるファイルに一致することを制限する任意の引数。 |
4.1.2.4. <hint-exists> 構文
<hint-exists>
要素は、分析に特定のヒントが含まれているかどうかを判断します。これは定義されたメッセージのインスタンスをすべて検索し、通常は <message>
要素内の開始または特定のクラスを検索するために使用されます。詳細は、HintExists クラスを参照してください。
特殊文字 ([
、'
など) が含まれるメッセージをテストする場合は、各特殊文字をバックスラッシュ (\
) でエスケープして正しく一致させる必要があります。
以下は、特定のヒントを検索する例です。
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="proprietary-servlet-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <testDataPath>data/</testDataPath> <rulePath>../weblogic.windup.xml</rulePath> <ruleset> <rules> <rule id="weblogic-eap7-05000-test"> <when> <!-- The <not> will perform a logical not operator on the elements within. --> <not> <!-- The defined <hint-exists> is attempting to match on the defined message. This message would have been generated by a matching <message> element on the <hint> condition. --> <hint-exists message="Replace with the Java EE standard method .javax\.transaction\.TransactionManager\.resume\(Transaction tx\)." /> </not> </when> <!-- This <perform> element is only executed if the previous <when> condition is false. In this configuration, it only executes if there is not a matching hint. --> <perform> <fail message="Note to replace with standard TransactionManager.resume is missing!" /> </perform> </rule> </rules> </ruleset> </ruletest>
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset"
id="proprietary-servlet-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<testDataPath>data/</testDataPath>
<rulePath>../weblogic.windup.xml</rulePath>
<ruleset>
<rules>
<rule id="weblogic-eap7-05000-test">
<when>
<!--
The <not> will perform a logical not operator on the elements within.
-->
<not>
<!--
The defined <hint-exists> is attempting to match on the defined message.
This message would have been generated by a matching <message> element on the <hint> condition.
-->
<hint-exists message="Replace with the Java EE standard method .javax\.transaction\.TransactionManager\.resume\(Transaction tx\)." />
</not>
</when>
<!--
This <perform> element is only executed if the previous <when> condition is false.
In this configuration, it only executes if there is not a matching hint.
-->
<perform>
<fail message="Note to replace with standard TransactionManager.resume is missing!" />
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
<hint-exists>
要素には固有の子要素がありません。
<hint-exists> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
message | String |
検索する |
in | String |
指定のファイル名を参照する |
4.1.2.5. <fail> 構文
<fail>
要素は実行を失敗として報告し、関連するメッセージを表示します。通常、これは、条件が満たされない場合のみメッセージを表示するために <not>
条件とともに使用されます。
<not>
構文 セクションに例が含まれています。
<fail>
要素には、一意の子要素がありません。
<fail> 要素属性
属性名 | タイプ | 説明 |
---|---|---|
message | String | 表示されるメッセージ。 |
4.2. XML ルールを手動でテストする
テストケースを作成する代わりに、ターミナルで MTA を実行することにより、アプリケーションファイルに対して XML ルールを実行するだけで済みます。
RHAMT_HOME/bin/rhamt-cli [--sourceMode] --input INPUT_ARCHIVE_OR_FOLDER --output OUTPUT_REPORT_DIRECTORY --target TARGET_TECHNOLOGY --packages PACKAGE_1 PACKAGE_2 PACKAGE_N
$ RHAMT_HOME/bin/rhamt-cli [--sourceMode] --input INPUT_ARCHIVE_OR_FOLDER --output OUTPUT_REPORT_DIRECTORY --target TARGET_TECHNOLOGY --packages PACKAGE_1 PACKAGE_2 PACKAGE_N
以下の結果が表示されるはずです。
Report created: OUTPUT_REPORT_DIRECTORY/index.html Access it at this URL: file:///OUTPUT_REPORT_DIRECTORY/index.html
Report created: OUTPUT_REPORT_DIRECTORY/index.html
Access it at this URL: file:///OUTPUT_REPORT_DIRECTORY/index.html
MTA の実行方法のその他の例は、Migration Toolkit for Applications の CLI ガイド に記載されています。
4.3. JUnit を使用してルールをテストする
テストルールが作成されたら、JUnit テストの一部として分析し、ルールが実行のすべての基準を満たしていることを確認できます。MTA ルールリポジトリーの WindupRulesMultipleTests
クラスは、複数のルールを同時にテストし、不足している要件についてフィードバックを提供するように設計されています。
前提条件
- MTA XML ルールをフォークし、クローン します。このリポジトリーの場所は RULESETS_REPO と呼ばれます。
- テスト XML ルール を作成します。
JUnit テスト設定の作成
以下の手順では、Red Hat Developer Studio を使用して JUnit テストを作成する方法を説明します。別の IDE を使用する場合は、JUnit テストの作成方法について IDE のドキュメントを参照してください。
- MTA ルールセットリポジトリーを IDE にインポートします。
カスタムルールを対応するテストとデータと共に
/path/to/RULESETS_REPO/rules-reviewed/RULE_NAME/
にコピーします。これにより、以下のディレクトリー構造を作成する必要があります。ディレクトリー構造
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ├── rules-reviewed/ (Root directory of the rules found within the project) │ ├── RULE_NAME/ (Directory to contain the newly developed rule and tests) │ │ ├── RULE_NAME.rhamt.xml (Custom rule) │ │ ├── tests/ (Directory that contains any test rules and data) │ │ │ ├── RULE_NAME.rhamt.test.xml (Test rule) │ │ │ └── data/ (Optional directory to contain test rule data)
├── rules-reviewed/ (Root directory of the rules found within the project) │ ├── RULE_NAME/ (Directory to contain the newly developed rule and tests) │ │ ├── RULE_NAME.rhamt.xml (Custom rule) │ │ ├── tests/ (Directory that contains any test rules and data) │ │ │ ├── RULE_NAME.rhamt.test.xml (Test rule) │ │ │ └── data/ (Optional directory to contain test rule data)
- トップメニューバーから Run を選択します。
- 表示されるドロップダウンメニューから Run Configurations… を選択します。
- 左側のオプションから JUnit を右クリックし、New を選択します。
以下の設定を入力します。
-
Name: JUnit テストの名前 (例:
WindupRulesMultipleTests
)。 -
Project: これが
windup-rulesets
に設定されていることを確認します。 Test class: これを
org.jboss.windup.rules.tests.WindupRulesMultipleTests
に設定します。
-
Name: JUnit テストの名前 (例:
Arguments タブを選択し、
-DrunTestsMatching=RULE_NAME
仮想マシン引数を追加します。たとえば、ルール名がcommunity-rules
であった場合は、以下のイメージのように-DrunTestsMatching=community-rules
を追加します。- 右下隅の Run をクリックしてテストを開始します。
実行が完了すると、結果を分析できるようになります。すべてのテストに合格した場合は、テストルールの形式に問題はありません。それ以外の場合は、テストの失敗で発生した各問題に対処することをお勧めします。発生する可能性のあるエラーの詳細については、検証レポートの実行時に報告されたエラー を参照してください。
4.4. 検証レポート
MTA 4.2 で導入された検証レポートにより、ルール開発者はテストルールが期待どおりに機能することを確認できます。各テストルールの詳細を提供するレポートを生成し、エラーとその発生場所を報告します。
前提条件
- MTA XML ルールをフォークし、クローン する必要があります。
- 検証するには、1 つ以上の テスト XML ルール が必要です。
検証レポートの作成
-
ローカルの
windup-rulesets
リポジトリーに移動します。 -
カスタムルールとテストを
rules-reviewed
ディレクトリーのサブディレクトリーにコピーします。これにより、以下のようになります。 windup-rulesets
リポジトリーのルートディレクトリーから以下のコマンドを実行します。Copy to Clipboard Copied! Toggle word wrap Toggle overflow mvn -Dtest=WindupRulesMultipleTests -DrunTestsMatching=CUSTOM_RULES clean surefire-report:report
$ mvn -Dtest=WindupRulesMultipleTests -DrunTestsMatching=CUSTOM_RULES clean surefire-report:report
たとえば、ルールが
/path/to/windup-rulesets/rules-reviewed/myTests/
ディレクトリーに保存されている場合、次のコマンドが使用されます。Copy to Clipboard Copied! Toggle word wrap Toggle overflow mvn -Dtest=WindupRulesMultipleTests -DrunTestsMatching=myTests clean surefire-report:report
$ mvn -Dtest=WindupRulesMultipleTests -DrunTestsMatching=myTests clean surefire-report:report
注記runTestsMatching
引数を省略すると、すべてのテストが検証レポートに含まれ、ランタイムが大幅に増加します。-
検証レポートの
surefire-report.html
は、windup-rulesets
リポジトリーのtarget/site/
サブディレクトリーに生成されます。
4.4.1. 検証レポートについて
検証レポートは、テストの失敗をパッケージと実行されたテストに整理するセクションに分割されます。レポートには以下のセクションが含まれます。
概要
概要には、実行されたテストの総数が含まれ、発生したエラーと失敗の数が報告されます。また、全体的な成功率と、レポートの生成にかかった時間 (秒単位) も表示されます。
パッケージ一覧
パッケージリストには、パッケージごとに実行されたテストの数が含まれ、発生したエラーと失敗の数が報告されます。また、分析する各パッケージの成功率と所要時間も秒単位で表示されます。
追加のテストケースが定義されていないかぎり、単一のパッケージ org.jboss.windup.rules.tests
が表示されることが期待されます。
テストケース
このセクションでは、実行された各テストについて詳しく説明します。それぞれの失敗には、人間が判読できるエラーのソースを示す行など、アサーションのスタックトレースを表示するために拡張できるオプションの Details セクションが含まれます。発生する可能性のあるエラーの詳細については、検証レポートの実行時に報告されたエラー を参照してください。
4.4.2. 検証レポートの実行時に報告されたエラー
検証レポートは、ルールとテストの実行中に発生したエラーを報告します。以下に、これらのエラーのリストとその解決方法を示します。
エラーメッセージ | 説明 | 解決策 |
---|---|---|
No test file matching rule | このエラーは、対応するテストファイルがないルールファイルが存在すると発生します。 | XML ルールのテスト で説明されているように、既存のルールのテストファイルを作成します。 |
Test rule Ids RULE_NAME not found! | このエラーは、対応するルールテストがないルールが存在する場合に出力されます。 | XML ルール構造のテスト で説明されているように、既存のルールのテストを作成します。 |
XML parse fail on file FILE_NAME | XML ファイルの構文は無効であり、ルールバリデーターにより正常に解析できません。 | 無効な構文を修正します。 |
Test file path from |
テストルール内の |
|
The rule with id="RULE_ID" has not been executed. | この検証中、提供された ID を持つルールは実行されません。 | 指定したルールで定義された条件に一致するテストデータファイルが存在することを確認します。 |
第5章 ルールのオーバーライド
MTA で (またはカスタムルールでも)、配布されるコアルールをオーバーライドできます。たとえば、ルールに一致する条件、作業、またはヒントテキストを変更できます。これは、元のルールのカスタムコピーを作成し、それをルールオーバーライドとしてマークし、必要な調整を行うことで行われます。これと同じ方法でルールを無効にすることもできます。
5.1. ルールのオーバーライド
次の手順を使用して、ルールをオーバーライドできます。
オーバーライドするルールが含まれる XML ファイルをカスタムの rules ディレクトリーにコピーします。
カスタムルールは、
RHAMT_HOME/rules
、${user.home}/.rhamt/rules/
、または--userRulesDirectory
コマンドライン引数で指定されたディレクトリーのいずれかに配置できます。XML ファイルを編集し、オーバーライドするルールの
<rule>
要素のみを保持します。新しいルールセットでオーバーライドされていない元のルールセットのルールは、通常どおり実行されることに注意してください。
- 同じルールとルールセット ID を保持するようにしてください。元のルール XML をコピーすると、ID が一致します。
-
<overrideRules>true</overrideRules>
エントリーをルールセットメタデータに追加します。 必要に応じてルールを調整します。
ルール定義では、すべてを変更することができます。このルールは元のルール全体をオーバーライドします。
以下は、オーバーライドされたルールの例です。ルールセットメタデータの <overrideRules>true</overrideRules>
要素に注意してください。ルールとルールセット ID は元のものと一致します。このルールのオーバーライドにより、必要な作業が 1
から 3
に変わりました。
<?xml version="1.0"?> <ruleset id="weblogic" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <metadata> ... <overrideRules>true</overrideRules> </metadata> <rules> <rule id="weblogic-02000" xmlns="http://windup.jboss.org/schema/jboss-ruleset"> <when> <javaclass references="weblogic.utils.StringUtils.{*}"/> </when> <perform> <hint effort="3" category-id="mandatory" title="WebLogic StringUtils Usage"> <message>Replace with the StringUtils class from Apache Commons.</message> <link href="https://commons.apache.org/proper/commons-lang/" title="Apache Commons Lang"/> <tag>weblogic</tag> </hint> </perform> </rule> </rules> </ruleset>
<?xml version="1.0"?>
<ruleset id="weblogic"
xmlns="http://windup.jboss.org/schema/jboss-ruleset"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<metadata>
...
<overrideRules>true</overrideRules>
</metadata>
<rules>
<rule id="weblogic-02000" xmlns="http://windup.jboss.org/schema/jboss-ruleset">
<when>
<javaclass references="weblogic.utils.StringUtils.{*}"/>
</when>
<perform>
<hint effort="3" category-id="mandatory" title="WebLogic StringUtils Usage">
<message>Replace with the StringUtils class from Apache Commons.</message>
<link href="https://commons.apache.org/proper/commons-lang/" title="Apache Commons Lang"/>
<tag>weblogic</tag>
</hint>
</perform>
</rule>
</rules>
</ruleset>
MTA を実行すると、ルール ID が一致する元のルールの代わりにこのルールが使用されるようになります。Rule Provider Executions Overview の内容を確認して、新規ルールが使用されていることを確認できます。
5.2. ルールの無効化
ルールを無効にするには、上記と同じ手順に従ってルールをオーバーライドしますが、空の <rule>
要素を指定します。
<?xml version="1.0"?> <ruleset id="weblogic" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> <metadata> ... <overrideRules>true</overrideRules> </metadata> <rules> <rule id="weblogic-02000" xmlns="http://windup.jboss.org/schema/jboss-ruleset"> <!-- Empty so that the original rule is disabled --> </rule> </rules> </ruleset>
<?xml version="1.0"?>
<ruleset id="weblogic"
xmlns="http://windup.jboss.org/schema/jboss-ruleset"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<metadata>
...
<overrideRules>true</overrideRules>
</metadata>
<rules>
<rule id="weblogic-02000" xmlns="http://windup.jboss.org/schema/jboss-ruleset">
<!-- Empty so that the original rule is disabled -->
</rule>
</rules>
</ruleset>
第6章 カスタムルールカテゴリーの使用
MTA ルールの重大度フィールドの概念を置き換える新しいカテゴリーフィールドが MTA 3.0 に追加されました。デフォルトのカテゴリーは、重大度フィールドで使用可能だったものと同じです (mandatory
、optional
、および potential
)。information
などの追加のカテゴリーも、後続の MTA リリースに含まれています。独自のカスタムルールカテゴリーを追加 し、それらに MTA ルールを割り当てる ことができるようになりました。
MTA は従来の severity
フィールドを使用するルールを引き続き処理できますが、新しい category-id
フィールドを使用するようにカスタムルールを更新することを推奨します。
カスタムカテゴリーの追加
-
RHAMT_HOME/rules/migration-core/core.windup.categories.xml
にあるルールカテゴリーファイルを編集します。 新しい
<category>
要素を追加し、以下のフィールドに入力します。-
id
: MTA ルールがカテゴリーの参照に使用する ID。 -
priority
: 他のカテゴリーと比較した並べ替えの優先度。値が最も低いカテゴリーが最初に表示されます。 -
name
: カテゴリーの表示名。 description
: カテゴリーの使用方法の説明。カスタムルールカテゴリーの例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow <?xml version="1.0"?> <categories> ... <category id="custom-category" priority="20000"> <name>Custom Category</name> <description>This is a custom category.</description> </category> </categories>
<?xml version="1.0"?> <categories> ... <category id="custom-category" priority="20000"> <name>Custom Category</name> <description>This is a custom category.</description> </category> </categories>
-
このカテゴリーは MTA ルールで参照できるようになりました。
カスタムカテゴリーへのルールの割り当て
MTA ルールでは、ルールの category-id
フィールドでカスタムカテゴリーの id
値を使用します。
カスタムルールカテゴリーを使用したルールの例
<rule id="rule-id"> <when> ... </when> <perform> <hint title="Rule Title" effort="1" category-id="custom-category"> <message>Hint message.</message> </hint> </perform> </rule>
<rule id="rule-id">
<when>
...
</when>
<perform>
<hint title="Rule Title" effort="1" category-id="custom-category">
<message>Hint message.</message>
</hint>
</perform>
</rule>
MTA を実行し、このルールの条件が満たされると、このルールによって識別されたインシデントでカスタムカテゴリーが使用されます。カスタムカテゴリーは、ダッシュボードや問題レポートなどの MTA レポートで確認できます。
図6.1 ダッシュボードのカスタムカテゴリー

付録A 参考資料
A.1. ルールのストーリーポイント
A.1.1. ストーリーポイントとは
ストーリーポイント は、アジャイルソフトウェア開発で一般的に使用される抽象メトリクスで、機能や変更を実装するのに必要な 作業量 を予測します。
Migration Toolkit for Applications はストーリーポイントを使用して、特定のアプリケーションコンストラクトとアプリケーション全体を移行するために必要な作業のレベルを表現します。必ずしも工数に変換される訳ではありませんが、この値はタスク全体で一貫性を持たせる必要があります。
A.1.2. ルールにおけるストーリーポイントの見積方法
ルールのストーリーポイントの作業レベルを見積もることは複雑です。以下は、ルールに必要な作業レベルを見積もる際に MTA が使用する一般的なガイドラインです。
作業レベル | Story Points | 説明 |
---|---|---|
Information | 0 | 移行の優先度が非常に低いか、優先度のない情報警告。 |
Trivial | 1 | 移行は、些細な変更または単純なライブラリースワップであり、API の変更はないか、最小限となります。 |
Complex | 3 | 移行タスクに必要な変更は複雑ですが、解決策が文書化されています。 |
Redesign | 5 | 移行タスクでは、API が大幅に変更され、再設計または完全なライブラリーの変更が必要になります。 |
Rearchitecture | 7 | 移行には、コンポーネントまたはサブシステムの完全な再アーカイブが必要です。 |
Unknown | 13 | 移行ソリューションは不明なため、完全な再書き込みが必要になる場合があります。 |
A.1.3. タスクカテゴリー
作業量レベルに加えて、移行タスクを分類してタスクの重大度を示すことができます。移行作業の優先順位付けに役立つ問題をグループ化するために、以下のカテゴリーが使用されます。
- 必須
- 移行を成功させるには、タスクを完了する必要があります。変更が行われないと、生成されるアプリケーションはビルドまたは実行に成功しません。たとえば、ターゲットプラットフォームでサポートされないプロプライエタリー API の置き換え例が含まれます。
- 任意
- 移行タスクが完了しない場合、アプリケーションは動作しますが、結果が最適になるとは限りません。移行時に変更が行われない場合は、移行の完了後すぐにスケジュールに配置することが推奨されます。これには、EJB 2.x コードの EJB 3 へのアップグレードが挙げられます。
- Potential
- 移行プロセス中にタスクを調べる必要があります。しかし、移行を成功させるためにタスクが必須かどうかを判断するのに十分な詳細情報がありません。これの例は、直接互換性のあるタイプがないサードパーティーのプロプライエタリタイプの移行です。
- Information
-
タスクは、特定のファイルの存在を通知するために含まれています。これらは、モダナイゼーション作業の一部として検証または変更する必要がある場合がありますが、通常は変更が必要ありません。これには、ロギング依存関係または Maven
pom.xml
があります。
タスクの分類に関する詳細は、カスタムルールカテゴリーの使用 を参照してください。
A.2. 関連情報
A.2.1. 既存の MTA XML ルールの確認
MTA XML ベースのルールは、GitHub の https://github.com/windup/windup-rulesets/tree/master/rules-reviewed にあります。
ローカルマシンでこれらのルールを取得する手順については、MTA XML ルールのフォークおよびクローン作成 を参照してください。
ルールは、ターゲットプラットフォームおよび機能でグループ化されます。新しいルールを作成する場合は、必要なルールと似たルールを見つけ、これを開始テンプレートとして使用すると便利です。
新しいルールは継続的に追加されるため、頻繁に更新を確認することをお勧めします。
A.2.1.1. Migration Toolkit for Applications XML ルールのフォークおよびクローン作成
Migration Toolkit for Applications の windup-rulesets
リポジトリーは、カスタム Java ベースのルールアドオンおよび XML ルールを作成する方法に関する作業例を提供します。カスタムルールを作成する際の開始点として使用することができます。
git
クライアントがマシンにインストールされていること。
-
Migration Toolkit for Applications Rulesets GitHub ページで
Fork
リンクをクリックし、自分用の Git にプロジェクトを作成します。fork によって作成されたフォークされた GitHub リポジトリーの URL はhttps://github.com/YOUR_USER_NAME/windup-rulesets.git
のようになります。 Migration Toolkit for Applications ルールセットリポジトリーをローカルファイルシステムにクローンします。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow git clone https://github.com/YOUR_USER_NAME/windup-rulesets.git
$ git clone https://github.com/YOUR_USER_NAME/windup-rulesets.git
これにより、ローカルファイルシステムに
crushup-rulesets
ディレクトリーが作成され、設定されます。新規作成されたディレクトリーに移動します。以下に例を示します。Copy to Clipboard Copied! Toggle word wrap Toggle overflow cd windup-rulesets/
$ cd windup-rulesets/
最新のコード更新を取得できるようにする場合は、リモートの
upstream
リポジトリーを追加して、元のフォークしたリポジトリーに変更を取得できるようにします。Copy to Clipboard Copied! Toggle word wrap Toggle overflow git remote add upstream https://github.com/windup/windup-rulesets.git
$ git remote add upstream https://github.com/windup/windup-rulesets.git
upstream
リポジトリーから最新のファイルを取得します。Copy to Clipboard Copied! Toggle word wrap Toggle overflow git fetch upstream
$ git fetch upstream
A.2.2. 重要なリンク
- MTA Javadoc: http://windup.github.io/windup/docs/latest/javadoc
- MTA フォーク: https://developer.jboss.org/en/windup
MTA JIRA 問題トラッカー
- MTA メーリングリスト: jboss-migration-feedback@redhat.com
- Twitter 上の MTA: @JBossWindup
-
MTA IRC チャネル: Server FreeNode (
irc.freenode.net
)、チャンネル (#windup
(transcripts))
改訂日時: 2023-01-23 07:41:35 +1000