04/20/2010: Updated tool to use the new SUA document (new as of 4/2010!) as discussed in bug 306627.
Check and fix-up licenses tool
This tool is a very simple aide to make license properties and files consistent in features. In short, in addition to the Eclipse legal requirements of having the right SUAs, licenses, etc., beginning with the Helios release requirements, we want them to also be perfectly equivalent (same text, same case, same dates, etc.), when in fact they are the same. This is done to improve ease-of-use of the Installation UI and make the license acceptance more meaningful, since all features which have the same license can be grouped so users would have fewer of them to read.
This simple tool works on (only) workspace files. It finds all projects that are features, by looking for those that contain a "feature.xml" file. Then it looks for a "feature.properties" file. If found, it checks for a "license" property in that file, and compares its value with the value of the standard version. If different, it will update the feature.properties file with the new, consistent license text. It leaves other parts of the file untouched (such as, it leaves in existing comments and white space, and just replaces the license part.
If the tools finds it needs to update the 'license' property, then it will blindly add or replace an existing license.html file with the one that has the standard HTML content.
To use the tool, first install it  and restart the Eclipse IDE. Then click Releng (on menu bar) and then click "Check Licenses". At that point, it does its work, modifying some if found inconsistent, but not others if already consistent, and it writes a log of what it founds and modified in the console.
Before committing and releasing any modified files, be sure to compare and look closely that the tool made the changes you expected and didn't mess something up (that is, use at your own risk ... the ultimate responsibility is still yours, not the tool's).
- Some data is hard code. For example, the license key must be, literally, 'license'. There's no technical reason it has to be 'license', but in my (limited) experience, they all are named 'license'. If someone used something else, like 'licenseString' then the program would need to be modified (or, the key changed first, before using the tool). Similarly for the license text and html file. If they change in the future, or someone has their own special one, the tool would have to be changed. The source can be obtained from the Web Tools Platform repository in a webtools.releng module.
- The Eclipse IDE preference for end-of-line (EOL) is not honored, and the OS EOL is used for simplicity.
- See bug 306627 for some history and details
- You can install "WTP Releng Tools Feature" from this repository.
- SCM CVS repository:
- drill down directory