@@ -219,11 +219,47 @@ by running Gradle with `-Dspotless.paddedcell`.
219219
220220### License Headers
221221
222- We require license headers on all Java files. You will notice that all the Java files in
223- the top-level ` x-pack ` directory contain a separate license from the rest of the repository. This
224- directory contains commercial code that is associated with a separate license. It can be helpful
225- to have the IDE automatically insert the appropriate license header depending which part of the project
226- contributions are made to.
222+ We require license headers on all Java files. With the exception of the
223+ top-level ` x-pack ` directory, all contributed code should have the following
224+ license header unless instructed otherwise:
225+
226+ /*
227+ * Licensed to Elasticsearch under one or more contributor
228+ * license agreements. See the NOTICE file distributed with
229+ * this work for additional information regarding copyright
230+ * ownership. Elasticsearch licenses this file to you under
231+ * the Apache License, Version 2.0 (the "License"); you may
232+ * not use this file except in compliance with the License.
233+ * You may obtain a copy of the License at
234+ *
235+ * http://www.apache.org/licenses/LICENSE-2.0
236+ *
237+ * Unless required by applicable law or agreed to in writing,
238+ * software distributed under the License is distributed on an
239+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
240+ * KIND, either express or implied. See the License for the
241+ * specific language governing permissions and limitations
242+ * under the License.
243+ */
244+
245+ The top-level ` x-pack ` directory contains code covered by the [ Elastic
246+ license] ( licenses/ELASTIC-LICENSE.txt ) . Community contributions to this code are
247+ welcome, and should have the following license header unless instructed
248+ otherwise:
249+
250+ /*
251+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
252+ * or more contributor license agreements. Licensed under the Elastic License;
253+ * you may not use this file except in compliance with the Elastic License.
254+ */
255+
256+ It is important that the only code covered by the Elastic licence is contained
257+ within the top-level ` x-pack ` directory. The build will fail its pre-commit
258+ checks if contributed code does not have the appropriate license headers.
259+
260+ You may find it helpful to configure your IDE to automatically insert the
261+ appropriate license header depending on the part of the project to which you are
262+ contributing.
227263
228264#### IntelliJ: Copyright & Scope Profiles
229265
0 commit comments