It's all about the answers!

Ask a question

update copyright with current year in changed files


Henrich Kraemer (111) | asked Feb 14 '11, 8:56 p.m.
I am working on a larger change set. For each changed file (mostly .java) the copyright should be updated to the current year.

For example the code currently might have
| (C) Copyright xyz company 2006, 2007. All Rights Reserved. |
and should be updated to
| (C) Copyright xyz company 2006, 2011. All Rights Reserved. |

The changes are managed by Jazz source control.

Using RTC 2.0.0.2 I did not find a feature that would help me update the copyrights without doing it manually file by file.
Is there a feature that would help here that I missed?

I found http://wiki.eclipse.org/Eclipse_copyright_tool. I looked only briefly at it, so the following could be wrong. It appears it uses the CVS history to determine which files need to be updated. A similar tool using the RTC history would cover my use case as well.

Thank you

Henrich

Accepted answer


permanent link
Lauren Hayward Schaefer (3.3k11727) | answered Jul 31 '13, 7:33 a.m.
JAZZ DEVELOPER
Hi Henrich,

I stumbled upon your question and thought I'd answer it in case others hit the same issue.  You can use the required content precondition to check at deliver time that files have a valid copyright.  https://jazz.net/forum/questions/33666/verify-source-code-during-check-in-or-delivery has more information on how to set this up.  We've written a custom advisor that checks the specifics of our IBM copyright and will correct the copyright if necessary.

We also use the Eclipse Fix Copyrights Tool internally to correct the copyright of all files.  More information is available here: https://jazz.net/wiki/bin/view/Main/CopyrightUpdate.  I'm unsure if this tool is available to external users.
Ralph Schoon selected this answer as the correct answer

Comments
Mike Shkolnik commented Dec 11 '13, 3:00 p.m.

It appears that CopyrightUpdate link does not work for the average Joe (or Mike). Any other way we can get that?


Lauren Hayward Schaefer commented Dec 11 '13, 3:15 p.m.
JAZZ DEVELOPER

The period was included in the link.  Try this:
https://jazz.net/wiki/bin/view/Main/CopyrightUpdate

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.