2

I want to add code from an Apache 2.0 software to my own code base which is MIT. I know that generally these are compatible but my worry is how to add the Apache 2.0 code with the appropriate modifications, remarks, new files and licenses.

My plan was to simply make a new folder with the Apache code in my own code copy their license and code (and my modifications there).

Do I need to do anything else? Where does the notices.md file go and what do I add to it?

I also need to include a copyright. Where does that go? Where do stating the changes to the software go?


This page https://tldrlegal.com/license/apache-license-2.0-(apache-2.0) recommends:

  • Must

  • Include Copyright

    Describes whether the original copyright must be retained.

  • Include License

    Including the full text of license in modified software.

  • State Changes

    Stating significant changes made to software.

  • Include Notice

    If the library has a "NOTICE" file with attribution notes, you must include that NOTICE when you distribute. You may append to this NOTICE file.


References from my research:

3

You can use (and modify) the codebase of the Apache component under the Apache license. You cannot re-license the Apache code to use MIT in the future, because there are addnl restrictions in the Apache license (stating changes, trademark use) which do not appear in the MIT license.

I always recommend to have one file licenses.md (or .txt or whatever) either in the top folder or in a 'licenses' subfolder, and include everything in that one file. In addition you should put a 'notices.md' into the same folder with the copyright attribution, list of changes etc. Some people put the notices in the same file with the licenses, but I think that makes it very difficult to read.

2
  • so is having the apache code on it's own place with it's own license separate from the top of my code (which is MIT) - ok? Do I need to add any comments at the top of my code that some subfolders are Apache? Nov 11 at 19:11
  • 2
    @CharlieParker Keeping the Apache licensed code in a separate subfolder is certainly good practice. You should clarify the different licenses of the different components in one license.md file for your project. You may want to consider adding SPDX declarations in each of the files. Nov 12 at 11:34

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.