update copyright with current year in changed files
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
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
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.
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.
Comments
It appears that CopyrightUpdate link does not work for the average Joe (or Mike). Any other way we can get that?
The period was included in the link. Try this:
https://jazz.net/wiki/bin/view/Main/CopyrightUpdate