Configuring BOM updates to ignore differences

You can configure the BOM update feature to selectively ignore certain differences between the BOM and the XOM.

If you add a .cfg file with new properties for the BOM file being updated, you can filter the differences that are detected when running a BOM update. That is, the BOM update feature filters out the differences that you do not want to display. However, ignoring the differences between the BOM and the XOM does not necessarily prevent them from being modified. The BOM methods and attributes can still be updated in action. For example, if the attribute that you ignore is the only difference between the BOM and the XOM class, then the BOM update feature does not propose an action. However, if you change another attribute in the same BOM class, the BOM update action updates the entire class, including the attributes that you choose to ignore.

The .cfg file should be placed in the same directory as the .bom file to which it applies. The name of the file must be identical to the .bom file, but with a .cfg file extension.

Values are comma-separated globs. Each glob must be preceded by either a plus "+" sign (inclusion) or a minus "-" sign (exclusion). The order in which the globs appear is important. Globs are converted to REGEX by replacing "*" and "?" with JRE REGEX equivalents, and "." and "\" are escaped. All other characters are not converted and appear in the REGEX as written. The REGEX is prefixed with a "ˆ" and is appended with a "$".

The following example provides an annotated .cfg file:

/** 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