Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

WTP/Releng/Tools

< WTP
Revision as of 14:05, 10 April 2010 by David williams.acm.org (Talk | contribs) (Check and fix-up licenses tool)

Check and fix-up licenses tool

This tool is a very simple aide to make license properties and files consistent in features[1]. 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 [2] 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).


Wtptool.png


Known limitations

  1. 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[3].
  2. The Eclipse IDE preference for end-of-line (EOL) is not honored, and the OS EOL is used for simplicity.

References

  1. See bug 306627 for some history and details
  2. You can install "WTP Releng Tools Feature" from this repository.
    http://download.eclipse.org/webtools/releng/repository
  3. SCM CVS repository:
     :pserver:anonymous@dev.eclipse.org:/cvsroot/webtools
    drill down directory
    webtools.releng/plugins/
    module:
    org.eclipse.wtp.releng.fixups

Back to the top