For example if I have code that contains parts of code rewritten from code found here or on Stack Overflow or other Creative-Commons licensed code, can my final code be licensed with an Apache License?


You should read and understand any license that you agree to. CC licenses, like CC-BY-SA-3.0, explicitly state:

You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License.

There are currently no approved compatible licenses.

IANAL, but it seems to me that you cannot sublicense CC content under the Apache license.

See also:

  • 2
    Interesting. If you are correct, then the code in answers on SO or any of the SE sites is unusable in a large number of projects. I suspect that that was not their intent so I look forward to having @JeffAtwood chime in on this. – Peter Rowell Oct 17 '12 at 20:16
  • In the referenced Meta SO link Jeff says "I am not sure this is really a practical ongoing concern except for the truly paranoid." – M. Dudley Oct 18 '12 at 12:24
  • 4
    Given the multimillion dollar fiasco that Oracle just ran Google through based (ultimately) on 9 lines of code, I find Jeff's statement—"That said, a snippet of code falls under excerpt category and thus should be free to use under fair use."—to be either outdated or naive. This is one of those times when his opinion should have been clearly marked as IANAL. – Peter Rowell Oct 18 '12 at 16:18

No, the licenses are not compatible as already outlined in the replies and one of the main differences is that the Apache License grants the patent rights together with the code unlike CC licenses.

A brief comparison of the license features is listed in wiki.
Here is a nice and brief overview of the Apache License 2.0 and CC-BY-4.0.

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.