6

I use three MIT licensed projects in my source code. Do I need to include three copies of the MIT license (in different directories), or can I just include a single copy of the MIT license on the root? If a commercial software uses my project where does it need to include the MIT license?

4

In your source code, you only need to keep the MIT license notices of your dependencies intact – you do not have to add them anywhere. If someone builds upon your software, they have to comply with the licenses of their entire dependency tree, and also look at your dependencies.

If you distribute your software in non-source form (e.g. compiled or minified), you still need to keep the notices intact. Then, it would make sense to copy the MIT license notices of your dependencies to a separate file, or to show it in a help message within your software.

The notice that you must preserve consists of both copyright notices and the MIT license text. There are two different variants of the MIT license (Expat and X11) which cannot be exchanged. But where the precise license text is duplicated, you are free to include it only once. For example:

License

Copyright 2019 your name

Your license text

Third party software

Dependency A

Copyright 2019 someone

License: MIT

Dependency B

Copyright 2016-2018 someone else

License: MIT

Third party license text

MIT

Permission is hereby granted ...

You can also look at how web browsers like Chrome or Firefox do this, which is generally reasonable. E.g. Firefox includes license text once, unless it differs with copyright notices or other additions. This means that MIT-licensed dependencies are each listed with their own license (e.g. “the dependency A license”), whereas standardized license documents like Apache 2 or GPL are only included once.

  • thanks for the clarification @amon.. what if my source code is public , do I still need to keep the notices intact? – Pravesh Agarwal Aug 12 at 10:03
  • 2
    @PraveshAgarwal Yes, you must always keep existing notices intact. – amon Aug 12 at 13:28
  • 1
    So, is it appropriate/compliant to just link to the text of the MIT license someplace else altogether? – einpoklum - reinstate Monica Aug 13 at 17:59
  • 2
    @einpoklum No, you must retain any existing notices. It's generally accepted to provide the license notice in a document that accompanies the software, but I don't think that merely linking to the notice would be sufficient. What my answer suggests is not linking, but organizing a document with multiple notices in a manner that minimizes duplication. It is inspired by Debian's COPYRIGHT file format. – amon Aug 13 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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