For example, if I use some open source code that is licensed with an MIT license in my (commercial) project, does my project in turn have to be under the MIT license or do I have to distribute the MIT license or anything like that?
views:
110answers:
5The answer depends on the text of the license. In the case of the MIT license, the text of the license reads (emphasis mine):
Copyright (c) [year] [copyright holders]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
If you're still unsure of how that affects you, you should really ask a lawyer, not StackOverflow.
It depends on the license, if you modify the code, if your code is derivative, etc. The license will tell you but you do have to read it.
No, the MIT license (similar to the BSD license) is very permissive in this regard. You can mostly do with libraries (and other software) released under this license whatever you want. Just if you bundle code from an MIT-licensed project with your own project, you, as far as I can tell, have to keep the license and copyright header of the affected files in place. For details read the license carefully :-)
The term you are looking for here is "viral". If a license has a viral nature, software A under that license used in software B affects the license of software B. With MIT as with BSD you should be on the safe side. On the other hand, there are some opensource license that are viral or at least have some traits of a viral license.
I'm not a lawyer, though, so it might be better to ask someone dealing with the legal sides of software licensing
It depends entirely on the conditions imposed by the license, so you have to read it carefully.
Earlier comment is spot on for MIT license. In general, your best bet when mixing proprietary and OSS code is to 1) read the specific license, 2) consult a lawyer, 3) comply with the license. Anything else is asking for trouble