Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 2.01 KB

HEADERS.md

File metadata and controls

39 lines (30 loc) · 2.01 KB

Headers

License Headers

OpenSearch-project uses Apache License v2 for all the projects.
Link Apache License v2

All files in opensearch-project should use OpenSearch SPDX license.

/*
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 *
 * Modifications Copyright OpenSearch Contributors. See
 * GitHub history for details.
 */

If files have any existing headers keep them and add OpenSearch SPDX license header on top.
Example: Version.java file has license header from Elasticsearch. The existing license is not removed and OpenSearch SPDX license header is added on top of it.

Automated License Headers' Checks

OpenSearch plugins have an inbuilt :licenseHeaders Gradle task to perform automated license headers' checks. All plugins should keep this check enabled in their build.gradle file.

Plugins can also use IntelliJ's Copyright feature to generate the license headers. The copyright profile can be shared in the plugin's repository so that license headers are consistently generated for all contributors.

Example: Enable license headers check + Add IntelliJ copyright profile

For complex multi-module projects and libraries, the :licenseHeaders check may not be available outside the plugin module. Such projects should consider using plugins like Spotless to validate and/or generate the license headers.

Example: Spotless configuration to generate the license headers