Project: Druid (App Definition and Development / Database)
File: license.md

<!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file ~ distributed with this work for additional information ~ regarding copyright ownership. The ASF licenses this file ~ to you 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. --> . This document explains how we manage the license of Druid and the libraries that Druid uses. When we do a new release, we distribute 2 packages, i.e., source code package and binary package. Since the binary package includes not only Druid itself but also all the dependencies of Druid, its `LICENSE` and `NOTICE` files should cover those dependencies as well. As a result, the contents of those files are different and managed separately for source code and binary packages. Please read the sections below to understand how we manage the licenses and what to update when you want to add new dependencies. The licenses for source code packages are maintained manually in . The notices can be found in similarly. The licenses for binary packages are maintained automatically. All licenses (for both source code and binary releases) should be registered in . and will generate the `LICENSE` and `NOTICE` files automatically based on the registry. This requires you to update the license and notice for both source code and binary packages. First, you should add a new entry in the ) for the dependency you are adding. For example, is adopted from Apache

This requires adding the following entries in the `LICENSE` file. ``` SOURCE/JAVA-CORE This product contains SQL query planning code adapted from Apache Calcite. processing/src/main/java/org/apache/druid/segment/filter/cnf/CalciteCnfHelper.java ``` If the project provides its own notice, the contents of the notice should be included in the `NOTICE` file of Druid. NOTE: Most projects don't provide notice. If you are not sure whether you need to add a notice, then you probably don't have to unless the dependency you are adding is an Apache project. Going back to the example of Apache Calcite, since all Apache projects provide the `NOTICE` file, you should add the following in the file. ``` ================= Apache Calcite 1.10.0 ================= Apache Calcite Copyright 2012-2016 The Apache Software Foundation This product is based on source code originally developed by DynamoBI Corporation, LucidEra Inc., SQLstream Inc. and others under the auspices of the Eigenbase Foundation and released as the LucidDB project. ``` Second, you also need to add a new entry in as below. ```yaml name: SQL query planning code adapted from Apache Calcite license_category: source module: java-core license_name: Apache License version 2.0 source_paths: processing/src/main/java/org/apache/druid/segment/filter/cnf/CalciteCnfHelper.java ``` This requires you to update the . For example, to add `aws-java-sdk-core` as a new depdency, you need to add the following entry. ```yaml name: AWS SDK for Java license_category: binary module: java-core license_name: Apache License version 2.0 version: 1.11.199 libraries: com.amazonaws: aws-java-sdk-core notice: | AWS SDK for Java Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. This product includes software developed by Amazon Technologies, Inc (http://www.amazon.com/). THIRD PARTY COMPONENTS This software includes third party software subject to the following copyrights: XML parsing and utility functions from JetS3t - Copyright 2006-2009 James Murty. PKCS#1 PEM encoded private key parsing and utility functions from oauth.googlecode.com - Copyright 1998-2010 AOL Inc. The licenses for these third party components are included in LICENSE.txt ``` When you update the version of existing dependencies, you need to update the version not only in the `pom.xml` file but also in the `licenses.yaml` file.