Copying text from the Elixir documentation and requirements of Apache 2 license

The Elixir project code, including the documentation, is licensed under Apache 2 license which requires that derivative works must contain a copy of the license in case it is being distributed.

Now imagine that the code, containing examples of usage of a library function, or a piece of documentation are copied to another project, creating thus a piece of derivative work (if I understand the works of the license correctly).

If a project is closed source or works as a web service without distributing any code or binaries, should a copy of Apache 2 be included into the project’s source code?

Does the license also require that its copy must be present in the code, if the same piece of examples and documentation from Elixir project is copied into a locally running IEx instance?

As I understand Apache 2 license, the answer to both questions should be No, because the clause of the license “4. Redistribution” is avoided in both cases and it is there the attribution requirement is present. But some people on the Internet still suggest to include a notice that some code under the licensed is used in the final product, which makes me doubt my assumptions.

The closest answers I’ve got on Stackexchage:

Remember that whole Elixir (including standard library) is Apache 2.0 as well. So your question applies to any Elixir program, not just documentation snippets.

The answer you already have - it is over the network, then you have no obligations. However if you really want to be “fully fair” you can have “legal” section (or similar) and list all projects and their respective licenses.

3 Likes

Thanks! Guess it answers my question.

It was confusing a bit to read and re-read the license, but now I feel more confident about my understanding of it.

Also, I’ve recently found one more answer here: