Jump to: navigation, search


< WTP‎ | Build
Revision as of 22:09, 14 September 2008 by David williams.acm.org (Talk | contribs) (Introduction)


In WTP we use a utility application, informally called VersionChecker, that can be used during a build to compare the current set of bundle version numbers to some reference set of version numbers to make sure they follow the rules of versioning (they all "increase" in minor or service fields) from one release to another.

Note: in Eclipse 3.4 there are API tools that should help developers spot and correctly increment version numbers. As far as I know, that is a "development time only" function, so there might still be a place for utilities such as this one which can provide "release management" build-time checking in case anyone forgets to update their bundle versions in spite of the tools.

Code Location

Bundle/module name:

CVS Location:
Module location:

Brief outline of use

The reference data is currently kept in a master file in the versionchecker bundle, named referenceVersioningData.xml. Each set if reference data is in one element, referenceData, with a reference id attribute which is how subsequent tests find the data to compare.

[TODO: in practice, it'd help to have the ability to find reference data in a location independent of the bundle.]

Listing data:

There is one mode (application) of only listing data, org.eclipse.wtp.releng.versionchecker.listVersions. After all, you need at least one reference to compare to. In practice, the reference data file is generated every build, in case that is desired to become official reference data.

Comparing data:

There is another mode (application) to compare the current set of version numbers (in the environment that is running) with a specified set of reference data.

In practice, this can be used as a JUnit test with code similar to the following.

	public void testVersionCompare() throws Exception {

		VersionLister versionLister = new VersionLister();
		String[] args = new String[]{"countQualifierIncreaseOnlyAsError", 
                                "-testToReference", "WTP-3.0.2", "-listToReferenceFile"};
		Object result = versionLister.run(args);
		boolean testok = (IApplication.EXIT_OK.equals(result));
		assertTrue("There is an error in versioning. See full listing for details.", testok);


During such a run of the test, there are several files created ... that are identified by the buildid:

This is simply a listing of the current version numbers ... in a form that can be used as a future reference set. If that is desired, then the set of data in this file, must be copied into the master data file, referenceVersioningData.xml

This is an actual report of the differences found. Also included are bundles that had do difference, bundles that are new, and bundles that are no longer in the current environment.

Not actually created, but exists in versionChecker bundle to produce an HTML form of the report. Can be customized or improved for better reports, naturally.

The versioning report in HTML form.