相違点を無視する BOM 更新の構成
BOM と XOM とのある種の相違点を選択的に無視するように、BOM 更新フィーチャーを構成することができます。
更新される BOM ファイルの新しいプロパティーを含む .cfg ファイルを追加すると、BOM 更新の実行時に検出される相違点をフィルター操作することができます。つまり、表示したくない相違点を BOM 更新フィーチャーがフィルターに掛けて除外するということです。ただし、BOM と XOM 間の相違点を無視したとしても、これらの相違点を変更しないようにするというわけではありません。BOM メソッドおよび属性は、まだアクションで更新することができます。例えば、無視する属性が BOM および XOM クラス間の唯一の相違点である場合、BOM 更新フィーチャーはアクションを提示しません。ただし、同じ BOM クラスで別の属性を変更すると、BOM 更新アクションは、無視を選択した属性を含め、クラス全体を更新します。
.cfg ファイルは、これが適用される .bom ファイルと同じディレクトリーに配置するようにしてください。 このファイルの名前は .bom ファイルと同じでなければなりませんが、ファイル拡張子は .cfg です。
値はコンマ区切りグロブです。各グロブの前に正符号「+」 (組み込み) または 負符号「-」 (除外) のいずれかを付ける必要があります。 グロブの並び順が重要です。 グロブは、「*」および 「?」を JRE REGEX で同等のものに置き換えることにより、REGEX に変換されます。 また、「.」および 「¥」はエスケープ処理されます。 その他の文字はすべて変換されず、記載されたとおりに REGEX に現れます。 REGEX の前には「ˆ」が付けられ、後には「$」が付けられます。
以下の例は、注釈付き .cfg ファイルを示しています。
/** This property ignores the following missing BOM elements:
* + the 'ignore' package and all sub-packages
* - except for the ignore.exception package and all sub-packages
* + the XOM class 'bank.Loan'
* + all classes in the 'branch' package as well as all sub-packages
* + the method 'bank.Customer.doSomething' taking a java.lang.String
* + all classes with 'test' in their package name
* + the attribute bank.Customer.age
* + classes starting with the name 'Test' followed by any 3 characters
*
* These classes/methods are not listed as missing from the BOM.
*/
update.ignoreMissingBomElement = +ignore.,¥
-ignore.exception.*,¥
+bank.Loan,¥
+branch.*,¥
+bank.Customer.doSomething[(]java.lang.String[)],¥
+*.test.*,¥
+bank.Customer.age,¥
+*.Test???
/** This property ignores the following missing XOM elements:
* + the BOM class 'new.BomClass'
*
* These classes/methods are not listed as missing from the XOM.
*/
update.ignoreMissingXomElement = +new.BomClass
/** This property ignores the following differences between BOM and XOM classes:
* + all attributes on 'bank.Customer'
* - except for the bank.Customer.name attribute
*
* These attributes/methods/domains are not analyzed for differences.
*/
update.ignoreDifferences = +bank.Customer.,-bank.Customer.name