Uploaded image for project: 'Apache Rat'
  1. Apache Rat
  2. RAT-125

Support applied ASL20 license headers, including checking for required copyright header line


    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9
    • Component/s: None
    • Labels:


      While checking on an ASL20 license header itself is supported by Apache Rat (duh), properly checking an applied ASL20 license (for usage outside the ASF) isn't supported yet.

      I've created an AppliedApacheSoftwareLicense20 check which does check this, using the http://apache.org/licenses/LICENSE-2.0.html#apply template as template (duh).
      This header matcher itself extends a more generic CopyrightHeader matcher, which only takes care of the copyright header line validation, using a regex pattern + configurable copyright owner.

      As an example the following configuration:

      <license implementation="org.apache.rat.analysis.license.AppliedApacheSoftwareLicense20">
      <copyrightOwner>FooBar (www\.foobar\.com)</copyrightOwner>

      will properly match a license header like:

      Copyright 2012 FooBar (www.foobar.com)

      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at


      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

      I'll attach a patch with the two header matchers + unit tests shortly.




            • Assignee:
              robertburrelldonkin Robert Burrell Donkin
              adouma Ate Douma
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: