Validation Tool for Eclipse Features and Plugins
Contributed by George Voutsinas (voutsin@ca.ibm.com)
Download the tool. (Note: source code is
included in the jar).
This tool is designed to validate the installed image of an Eclipse based
product. The primary goal is to ensure that the installed product can be
serviced via the Eclipse Update Manager successfully after deployed. No
modifications are made to the product, and only the feature.xml, plugin.xml, and
fragment.xml files are processed.
Run the tool: java -cp validate.jar com.ibm.validate.Product
<parameters>
Parameters:
| -main <drive>:\location |
Location of your features/plugins folders.
These locations contain the features and plug-ins that need to be verified.
You can specify multiple "-main" parameters if your product is installed
into multiple locations. |
| -base <drive>:\location |
Location of a dependent product that we
don't want to verify, but contains features our product references. This
location is only parsed
to verify that everything our product requires, exists. |
| -log <drive>:\location |
Location of log file. If this parameter is
not specified, the log is dumped to the console. |
An example of WSAD verify:
Check that all features/plugins are installed in wstools folder and they
require the wswb features installed in the eclipse folder: -main c:\wsad\wstools
-base c:\wsad\eclipse
Here are some of the checks the tool performs:
Feature testing:
- verifies that all the feature.xml's are well formed.
- verifies that all the "include" features, included by each feature can be
resolved. Optional features don't need to be there for this test to pass.
- verifies that all the plugin's owned by a feature exist. No exceptions.
- verifies that all features have a parent feature. Only patches and features
that have an Update URL are exempt. I think this means everything is
serviceable.
Plug-in testing:
- verifies that all plugin or fragment xml's are valid or exist. Although
folders can exist in the plugin structure with no xml, we try to avoid this.
- verifies that all plug-in's have a parent feature. This is the only way to
make sure they can be serviced.
Verify that all plug-in's have a SINGLE parent feature. Just to be safe.
Product testing:
- verifies that all features are unique across the entire product.
- verifies that all plug-ins are unique across the entire product.
- verifies that all "require" features, required by each feature can be
resolved. If my WDSC feature requires wswb2.1.1, then it should exist. It also require the versions to match and ignore any of the "match"
variables. Yes, we're just being overly specific.
- verifies that all required plug-ins, required by each feature, can be
resolved. Again, we're being VERY specific, so versions matter.
- lastly, build a feature hierarchy. This just lets you see how things
are organized, and if there's a loop anywhere in the dependencies, it should
be caught.
Happy testing :-)