Apache License 2.0(简称Apache-2.0)是一种广泛使用的开源软件许可证,它允许软件的自由使用、复制、修改和分发,包括用于商业目的。以下是Apache-2.0许可证的关键点解析:
版权和许可授予:
著作权人授予您使用、复制、修改、展示、表演、分发和创建衍生作品的永久、全球、非排他性、免费、免版税、不可撤销的版权许可。
这意味着你可以自由地使用和修改遵循Apache-2.0许可证的软件,并将其用于商业项目,只要你在使用或分发该软件时遵循许可证的条款。
专利许可:
每个贡献者还授予您专利许可,用于制作、使用、销售、进口和以其他方式转让作品,但仅限于他们贡献所侵犯的专利权利要求。
如果你发起专利诉讼,声称作品或贡献构成直接或间接专利侵权,则专利许可将终止。
再分发的要求:
在分发软件时,你必须包括许可证的副本。
如果你修改了软件,你必须在修改过的文件中包含显眼的通知。
你必须保留所有版权、专利、商标和归属通知,除非它们不适用于衍生作品的部分。
如果作品有“NOTICE”文件,你必须在衍生作品中包括该文件的内容。
贡献:
你提交的任何有意贡献都将遵循Apache-2.0的条款,除非你有额外的协议。
商标:
本许可证不授予使用许可方的商标或商号的权利,除非为了描述作品的起源和复制品的必要。
免责声明和责任限制:
许可方不提供任何类型的保证。
贡献者不对任何损害承担责任,除非在适用法律下有特别要求。
接受保修或额外责任:
你可以提供支持、保修等,并为此收费,但这完全是你自己的责任,并且你必须同意赔偿贡献者因你接受保修而可能产生的任何责任。
Apache-2.0许可证旨在促进软件的自由流通和创新,同时保护贡献者的知识产权。它允许商业使用,但也要求遵守一定的透明度和归属原则,以尊重原作者和贡献者的权益。如果你计划在商业项目中使用遵循Apache-2.0许可证的软件,你应该确保你理解并遵守这些条款。
几个问题:
1. Apache-2.0需要开放源码吗?
当你使用或修改Apache-2.0许可的软件时,你不必将你的修改或衍生作品也以Apache-2.0发布。你可以选择不同的许可证来发布你的修改或衍生作品,甚至可以选择将其作为专有软件发布而不公开源代码。
然而,尽管Apache-2.0许可不要求你公开衍生作品的源代码,但它确实有一些重要的要求:
保留版权和许可通知:你必须保留原始软件中的版权、许可和专利通知。
显示修改:如果你修改了软件,你必须在修改过的文件中包含显眼的通知,说明你进行了修改。
分发许可副本:你必须随同软件分发一份Apache-2.0许可证的副本。
不修改许可:你不能以任何方式修改Apache-2.0许可的条款。
不滥用商标:你不能使用Apache或贡献者的商标来暗示他们对你的作品的认可。
2. Apache-2.0和GPL3协议区别?
Apache License 2.0(简称Apache-2.0)和GNU General Public License version 3(简称GPLv3)是两种不同的开源软件许可证,它们之间有几个关键的区别:
Apache-2.0的特点:
宽松式许可:Apache-2.0是一种宽松式许可,它允许你在修改后的软件中使用专有许可证,也就是说,你可以在不公开源代码的情况下,将基于Apache-2.0许可的软件的修改版本作为专有软件发布。
专利许可:Apache-2.0包括专利许可,这意味着贡献者同意不会对你使用、修改或分发其贡献的专利提起诉讼。
无传染性:Apache-2.0没有所谓的“传染性”或“粘性”特性,因此,你可以在专有软件中使用Apache-2.0许可的库或组件,而不必将整个软件项目开源。
商业友好:Apache-2.0允许商业使用,并且对商业软件友好,因为它不要求你公开衍生作品的源代码。
GPLv3的特点:
强传染性(Copyleft):GPLv3具有“传染性”,这意味着如果你修改了GPLv3许可的软件,或者将GPLv3许可的软件与你的代码集成,那么你的修改或集成后的代码也必须按照GPLv3发布,保持开源。
专利许可:GPLv3也包括专利许可,但是它的专利许可条款在某些情况下可能会自动终止,例如,如果你对使用GPLv3软件的人提起专利诉讼。
禁止数字权限管理(DRM):GPLv3明确禁止在软件中实施数字权限管理(DRM)系统,这与Apache-2.0没有直接规定这一点不同。
自由软件:GPLv3是自由软件基金会(FSF)认可的一种许可证,它确保用户有自由运行、研究、修改和分发软件的权利,而Apache-2.0虽然也符合自由软件的定义,但其重点在于宽松的使用和分发自由。
总结:
Apache-2.0更侧重于代码的可重用性和商业可行性,而GPLv3则更侧重于确保代码的自由和开放。
如果你打算在商业项目中使用开源代码,并且不希望公开自己的源代码,Apache-2.0可能是更好的选择。
如果你想要确保任何基于你的代码的工作也保持开源和自由,那么GPLv3会是一个更合适的选择。
以下是全文中英文对照翻译:
Apache License
Version 2.0, January 2004
Licenses
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Apache许可证
2004年1月发布的第2版
Licenses
使用、复制和分发的条款和条件
1.Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
1.定义
“许可证”是指本文件第1节至第9节所定义的使用、复制和分发的条款和条件。
“许可方”是指版权所有者或者版权所有者授予本许可证的实体。
“法人实体”是指行为实体以及控制该实体、受该实体控制或与该实体共同控制的所有其它实体的联合体。在本定义中,“控制”是指 (i) 直接或间接领导或管理该实体的权力,无论是通过合同还是其它方式,或 (ii) 拥有百分之五十 (50%) 或更多已发行股份,或 (iii) 拥有该实体的实益所有权。
“您”(或“您的”)是指行使本许可证授予权限的个人或法人实体。
“源”的形式是指进行修改的首选形式,包括但不限于软件源代码、源文件和配置文件。
“对象”的形式是指源的形式经机器转换或翻译后产生的任何形式,包括但不限于编译后的目标代码、生成的文件以及到其它媒体类型的转换。
“作品”是指根据本许可证提供的原创作品(无论是源还是对象的形式),如作品中包含或附加的版权声明所示(下面的附录中提供了示例)。
“衍生作品”是指基于(或源自)某一作品的任何作品(无论是源还是对象的形式),并且在整体上代表一个独立创作的编辑修订、注释、拓展或其它修改的作品。就本许可证而言,衍生作品不包括与原始作品分离的作品,或者仅仅与原始作品或其衍生作品之间的接口有链接关系(或通过名称绑定)的作品。
“贡献”是指任何原创作品(包括作品的原始版本以及对该作品或其衍生作品进行任何修改或添加后的版本)被版权所有者或者授权代表版权所有者进行提交的个人或者法律实体有意向地提交给许可方,以便将其纳入到作品中。就本定义而言,“提交”是指以任何形式的电子、口头或书面沟通的形式发送给许可方或者其代表,包括但不限于由许可方或者代表许可方管理的电子邮件列表、源代码控制系统和问题跟踪系统上的沟通,用于讨论和改进工作,但不包括版权所有者明显标记或者以其它书面方式指定为“非贡献”的沟通。
“贡献者”是指许可方和代表贡献被许可方接受并随后纳入作品的任何个人或法人实体。
2.Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
2.授予版权许可证。按照本许可证的条款和条件,每个贡献者特此授予您永久的、全球性的、非排他性的、免费的、免版税的、不可撤销的版权许可,以复制、制作衍生作品、公开展示、公开表演、分许可,并以源或对象的形式分发本作品或其衍生作品。
3.Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
3.授予专利许可。按照本许可证的条款和条件,每个贡献者特此授予您永久的、全球性的、非排他性的、免费的、免版税的、不可撤销的(除非在本节中另有约定)专利许可,以制造、委托制造、使用、许诺销售、销售、进口或以其它方式转让作品,前述专利许可仅适用于贡献者有权许可的专利权利要求,这些专利权利要求必然因其贡献本身或其贡献与提交该贡献的作品相结合而受到侵犯。如果您对任何实体提起专利诉讼(包括诉讼中的交叉索赔或反诉),声称作品或作品中包含的贡献构成直接或共同的专利侵权,则按照本许可证授予您的有关该作品的任何专利许可自提起诉讼之日起终止。
4.Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
4.再分发。您可以在任何媒体上以源或对象的形式复制和分发本作品或其衍生作品的副本(无论经过修改还是未经修改)。但需满足以下条件:
(a)您必须向作品或其衍生作品的任何其他接收者提供本许可证的副本;
(b)您必须让任何经过修改的文件带有显著的声明,说明您更改了文件;
(c)在您分发的任何衍生作品的源中,您必须保留该作品的源中的所有版权、专利、商标和归属的声明,但不包括与衍生作品任何部分无关的声明;
(d)如果作品包括一个“声明”文本文件作为其分发的一部分,则您分发的任何衍生作品都必须在以下至少一个地方包括该声明文件中包含的归属声明的可读副本,但不包括与衍生作品任何部分无关的声明:作为衍生作品的一部分分发的声明文本文件内;如果存在与衍生作品一起提供的源或文档,则在源或文档中;或者,在衍生作品生成的显示中第三方声明通常出现的任何地方。声明文件的内容仅供参考,不会修改许可证。您可以在您分发的衍生作品中添加您自己的归属声明,与作品中的声明文本一起或作为其附录,前提是此类附加归属声明不会被视为对许可证的修改。
您可以在您修改后的作品中添加您自己的版权声明,并可以为您修改后的作品或整个衍生作品的使用、复制或分发提供附加或不同的许可条款和条件,前提是您对作品的使用、复制和分发在其它方面符合本许可证中约定的条件。
5.Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
5.提交贡献。除非您另有明确说明,否则您向许可方有意提交的包含在作品中的任何贡献均将遵守本许可证的条款和条件,无任何附加条款或条件。尽管有上述约定,本文中的任何内容均不得取代或修改您可能与许可方就前述贡献签署的任何单独许可协议的条款。
6.Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
6.商标。本许可证不授予使用许可方的商号、商标、服务标记或产品名称的权限,除非在合理和习惯使用范围内,用于描述作品的起源和复制声明文件的内容。
7.Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
7.免责声明。除非适用法律要求或书面同意,许可方“按原样”提供作品(并且每个贡献者提供其贡献),不带有任何明示或暗示的担保或条件,包括但不限于任何对作品的所有权、不侵权、可销售性或适合特定用途的保证或条件。您全权负责确定使用或重新分发本作品的适当性,并承担与您按照本许可证行使权限相关的任何风险。
8.Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
8.责任限制。在任何情况下,根据任何法律理论,无论是侵权行为(包括过失侵权)、合同还是其它原因,除非适用法律的要求(例如故意和重大过失行为)或书面同意,否则任何贡献者均不对您的损害承担责任,包括因本许可证或因使用或无法使用本作品而产生的任何直接、间接、特殊、附带或间接性质的损害(包括但不限于商誉损失、停工造成的损害、计算机故障,或其它任何商业损害或损失),即使贡献者事先已被告知发生前述损害的可能性。
9.Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
9.接受担保或额外责任。在重新分发作品或其衍生作品时,您可以选择提供与本许可证一致的支持、担保、赔偿或其它责任义务和/或权利,并收取费用。然而,在接受此类义务时,您只能代表您自己并自行承担责任,而不能代表任何其它贡献者,并且仅当您同意对因您接受任何前述保证或额外责任而导致该贡献者产生的任何责任或针对该贡献者提出的索赔进行赔偿、为其辩护并使其免受损害时,您才能接受此类义务。
END OF TERMS AND CONDITIONS
以上为全部条款和条件
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
附录: 如何在您的作品中应用Apache许可证
要将Apache许可证应用于您的作品,请附上以下声明模板,并使用您自己的标识信息替换括号"[]"中的字段。(不要使用括号!)文本应包含在文件格式的适当注释语法中。我们还建议将文件或类名称以及用途描述包含在与版权声明相同的“打印页”上,以便在第三方存档中更容易被识别。
版权所有 [年份] [版权所有者名称]
根据Apache许可证2.0版(本“许可证”)获得许可;除非遵守许可证,否则您不得使用此文件。您可以在以下位置获取许可证副本:
http://www.apache.org/licenses/LICENSE-2.0
除非适用法律的要求或书面同意,否则按照本许可证的约定分发的软件将基于“按原样”,不带有任何明示或暗示的担保或条件。请参阅本许可证,了解本许可证下管理权限和限制的特定语言。