If one is to release a new open source project using a license like Apache 2.0 or MIT, or any other, and this project uses some files or parts of code, that can be slight modified for a proper use or as they are, how to specify the license attribution?

Let's suppose there is the following code structure

  • File 1
  • File 2
  • File 3
  • File 4
  • ... over other 20 files

But File 2 is all my code, except one or two lines of that project code File 3 is fully code from the other project, with possible small changes to adapt to my project

Should I post the full license of the Apache project on the beginning of File 3?

What about File 2? How to indicate that part of the code has another license?

  • It depends on the requirements of the licence on File 2. What licence is it under?
    – MadHatter
    Jun 10, 2022 at 5:18
  • The code from another project is Apache 2.0 Jun 10, 2022 at 12:07


Your Answer

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

Browse other questions tagged or ask your own question.