在开源程序中添加许可证是必不可少的一个工作,下面我们来看一下当今最常用开源许可证Apache License2.0如何添加到自己的开源程序中,添加License十分简单,根据下面的步骤你只需要5分钟就可以完成。
1、官网条款全文
全文地址:https://www.apache.org/licenses/LICENSE-2.0
可以打开官文看一下全文内容,也可以跳过直接看下面步骤。
2、如何应用到开源程序中
-
将下文拷贝保存到LICENSE文件中(或NOTICE文件,建议两个都有)。
下文为官网拷贝下来的内容,建议从官网拷贝。
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 th