Hi,

At the moment we have a slightly odd situation with license headers
in .java files within myfaces projects.

In some projects, the license header looks like this:

 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file

while in other projects it looks like this:

 *  Licensed to the Apache Software Foundation (ASF) under one
 *  or more contributor license agreements.  See the NOTICE file

Note the extra space after the leading asterisk. In addition, the one in
the 1.2.x line also has two lines of " * ", where the 1.1.x line uses
just " *".

The checkstyle rule that checks license headers against a "known" piece
of text therefore has problems.

There are three ways to deal with this:
(1) Do a mass replace of headers so every myfaces project uses one style
(2) Require each mvn module to use one license style consistently
internally, but allow different projects to use different styles.
Checkstyle must then be configured to use the right header template for
each project.
(3) Use the checkstyle "regular expression header matcher" for the
headers, so that whitespace differences are allowed.

In the recently released checkstyle module I included three different
headers so that both (2) and (3) are possible. 

Currently I'm taking approach (2), ie for each project as I enable
checkstyle checking I'm fixing up header text on files to match the
"majority" of other files in the same project.

Are people ok with that?




Just FYI, the reason for this difference in the shared 2.x vs 3.x lines
appears to be as follows (I expect the same happened to other projects):
  * 2.x line of shared was branched for JSF1.2 on r412299
  * in the 2.x line, grantsmith cleaned up the license headers in
r472618
  * in the 3.x line, matzew cleaned up the license headers in r557350

The license headers did need cleaning up, because at the point that the
two lines diverged, the files still had the old "copyright YYYY" style
license text. So both branches had this old stuff that needed to be
replaced. But Grant used one license text template, and Matthias used a
different one.

Regards,
Simon



Reply via email to