Is a license header in source files required when applying the Apache Software License 2.0 to a project? [closed]

softwareengineering.stackexchange https://softwareengineering.stackexchange.com/questions/270091

  •  06-10-2020
  •  | 
  •  

Question

Reading through the Apache Software License 2.0 appendix I am left unclear what exactly I have to do now:

APPENDIX: How to apply the Apache License to your work

To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.

To explain a bit more: I am currently contributing to an open-source project on github, where the decision to license under ASL2.0 was made. In the latest commit, the license text was added as LICENSE to the root directory.

The interesting part is now: What else has to be done to fully license the code under Apache Software License. In specific: What is considered "work" and is it mandatory to include the boilerplate notice to each and every source-file in the project?

I figure it should be possible to add the notice to the already existing README, as I have seen it in other open source projects. Something along the lines of:

License:

Unless explicitly stated otherwise all files in this repository are licensed under the Apache Software License 2.0 [insert boilerplate notice here]

I think that should be okay, because the Apache Policy on Source Headers (even though intended for Apache Software Foundation owned projects only) states:

Each original source document (code and documentation, but excluding the LICENSE and NOTICE files) SHOULD include a short license header at the top. If the distribution contains documents not covered by CLA, CCLA or Software Grant (such as third-party libraries) then see the policy guide.


  1. Each source file should include the following license header -- note that there should be no copyright notice in the header:

Specifically the "should" here makes me think, that a license header in every file is not mandatory for each and every source-file of a project licensed under ASL.

Was it helpful?

Solution

No, it is not necessary to include the license in every file. This is a recommended practice, because it ensures that if somebody is viewing one of the files from your project in isolation from the rest they will be able to identify the terms of use for it, but in the end, as long as you do something that makes it clear what the intended license terms are, that is enough, legally speaking.

(Note that this is not legal advice; if this is important you should seek advice of a lawyer in your jurisdiction, etc.)

OTHER TIPS

It was already mentioned in the comments, but to make it more visible, repeating the section from the Apache Software Foundation FAQ here (it might have been added later on).

DO I HAVE TO HAVE A COPY OF THE LICENSE IN EACH SOURCE FILE?

Only one full copy of the license is needed per distribution. See the policy.

http://www.apache.org/dev/apply-license.html#copy-per-file

Licensed under: CC-BY-SA with attribution
scroll top