Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "WTP/Releng/Tools"

< WTP
(Check and fix-up licenses tool)
(Check and fix-up licenses tool)
Line 1: Line 1:
 
== 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. See {{bug|306627}} for some history and details. In short, in addition to the Eclipse requirement of having the right SUAs, etc., in features, beginning with the Helios release, we want them to be perfectly consistent, to improve ease-of-use of the Installation UI and make the license acceptance more meaningful.  
+
This tool is a very simple aide to make license properties and files consistent in features<ref>See {{bug|306627}} for some history and details</ref>. In short, in addition to the [http://www.eclipse.org/legal/ Eclipse legal requirements] of having the right SUAs, licenses, etc., beginning with the Helios release, we want them to also be perfectly consistent (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.
  
It 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 so, it checks for a "license" property om 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, correct and 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.
+
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 om 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 it finds it needs to update the 'license' property, then it will blindly replace the existing license.html file with one that has the standard HTML Content.  
+
If the tools finds it needs to update the 'license' property, then it will blindly replace an existing license.html file with the one that has the standard HTML content.  
  
To operate, click Releng (on menu bar) and then click "Check Licenses". At that point, it does its work, maybe modify some, not others, but it does write a log of what it did in the console.  
+
To use the tool, first install it <ref>You can install "WTP Releng Tools" from this repository.
 +
: http://download.eclipse.org/webtools/releng/repository </ref> 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.  
  
Be sure to compare and look closely that the tool didn't mess something up and make things worse before you commit to head and release for a build.
+
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).  
  
  
Line 16: Line 17:
  
  
=== Installation Repository ===
+
=== Known limitations ===
  
You can install "WTP Releng Tools" from this repository.
+
# 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<ref>:pserver:anonymous@dev.eclipse.org:/cvsroot/webtools</ref>in a webtools.releng module<ref>webtools.releng/plugins/org.eclipse.wtp.releng.fixups</ref>.
 +
# The Eclipse IDE preference for end-of-line (EOL) is not honored, and the OS EOL is used for simplicity.
  
: http://download.eclipse.org/webtools/releng/repository
+
=== References ===  
 
+
=== CVS location of source code ===
+
 
+
: /cvsroot/webtools
+
: webtools.releng/plugins/org.eclipse.wtp.releng.fixups
+
 
+
=== Known limitations ===
+
  
# Some key data is hard code. For example, the license key must be, literally, "license". There's no reason it has to be, but in my experience, they all are named "license". If someone used something else, like "licenseStr" then the program would been to be made better.
+
<references/>
# The Eclipse preference for end-of-line (EOL) is not honored, and the PD EOL is used for simplicity.
+

Revision as of 06:21, 10 April 2010

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, we want them to also be perfectly consistent (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 om 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 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[3]in a webtools.releng module[4].
  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" from this repository.
    http://download.eclipse.org/webtools/releng/repository
  3. :pserver:anonymous@dev.eclipse.org:/cvsroot/webtools
  4. webtools.releng/plugins/org.eclipse.wtp.releng.fixups

Back to the top