dev@glassfish.java.net

Re: copyright date

From: Bill Shannon <bill.shannon_at_sun.com>
Date: Tue, 23 Mar 2010 19:58:40 -0700

Jane Young wrote on 03/23/2010 06:01 PM:
> Hi Bill,
>
> I looked into the maven-license-plugin
> (http://code.google.com/p/maven-license-plugin).
>
> We can use this in our GF workspace and update/replace all the files
> (*.java, *.properties, *.xml, etc) with the same license header file.

Except that they *shouldn't* all have the same license header.

> This can be an one time step to update and commit the files and then
> added to the build (pom.xml) such that it will check for any files w/o a
> header or the wrong year and fail the build.
>
> Some files have the following years: "Copyright 1997-2010" and
> "Copyright 1998-2010. Using the maven-license-plugin, it will update
> all the files to use the same year: "Copyright 2010". Are you okay
> with this?

Absolutely not. That would be wrong.

1. Not all files have been modified this year.
2. We need to keep the first copyright year as well.

> Also, the copyright file has "Sun Microsystems, Inc. All rights
> reserved." We should change that to say Oracle?

I'm still waiting for someone to tell us to do that; I assume
it's only a matter of time.

> Is there an updated Copyright file I can use as a template ?

It depends on the license of the file. I think what you had is
correct for files that should be licensed under CDDL/GPL. But
some files have only an Apache or BSD license, some files have
a CDDL/GPL license *and* one of two slightly different Apache licenses.

It's complicated. You can't just blindly change everything.

Working with Lloyd, I believe we got all the *.java files to have
the correct license and copyright date. If there's a maven plugin
that can ensure the copyright date is always correct, and it can
handle the date ranges we have in most files, it's worth considering.
Run it on the current workspace and show me the output.