15

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.

closed as off-topic by Martin Maat, amon, gnat, BobDalgleish, Bart van Ingen Schenau Aug 29 at 13:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking for legal advice or aid are off-topic here. You may be able to get help with understanding, applying, and complying with free and open licenses on Open Source. You may be able to get help with legal terms, concepts, language, and procedures on Law." – Martin Maat, amon, gnat, BobDalgleish, Bart van Ingen Schenau
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Do you have any objections to simply including the header in each source file? – Robert Harvey Jan 14 '15 at 19:36
  • Well it's a hassle :( Additionally a possible relicensing is made unnecessarily complicated with that and I have a personal "grudge" against license headers. – Vogel612 Jan 14 '15 at 19:38
  • 2
    Meh. A license change is a Find and Replace operation across all files, in any IDE worth its salt. – Robert Harvey Jan 14 '15 at 19:42
  • You could also just include a short statement in each file such as "This project is licensed under the XYZ license. For details see the LICENSE file which can be found at the base of this project archive" or words to those effect. – Brandin Oct 6 '15 at 8:08
  • 2
    No, it is not necessary: apache.org/dev/apply-license.html#copy-per-file But as Jules states below, if a file is viewed or reused in isolation, the license will be evident – Steen Apr 6 '17 at 9:05
17

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.)

2

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.