Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.89 KB

HEADERS.md

File metadata and controls

29 lines (19 loc) · 1.89 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.

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