I want to convert library, which is licensed under Apache 2.0, to another programming language. The port will be initially pretty straightforward, i.e. I'll keep classes hierarchy and identifier names.

By no means I want to compromise copyright of original authors or change the license. Should I just copy LICENSE file and state in readme that this is a port? Or should I keep copyright comments in the code? In latter case, should I keep only original authors in copyright or add myself too?

1 Answer 1


Based on section 4 of the license, you need to:

  • keep original copyright comments
  • mark the files as changed (eg. modification copyright XXX XXXX)
  • keep or reproduce the text of the Apache 2 license
  • keep the NOTICE file if it exists

It would make sense to leave in the readme that you have created a port.

Edit: Clarified that the license text, not the LICENSE file, needs to be kept, because some projects places in the Apache 2 license in the NOTICE file.

  • "mark the files as changed" - does this mean the code files or the licence files ? The version in a new language might not contain any of the same code files simply due to differences in the languages. Jun 15, 2021 at 18:47
  • For normal modification you would need to note the modification in the file itself. If you are changing the extension of the file already then that is probably enough notice of the change already (note that you do not need to explain what modifications have been made). However, if there is an existing Apache 2 header in the original file, then you still need to keep that header, and in that case I would add the "modification copyright ..." line to avoid confusion over who wrote what.
    – Max Xiong
    Jun 17, 2021 at 1:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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