Skip to main content

Copyright Headers

Where possible, all source code, property files, and metadata files (including application, test, and generated source code as well as other types of files such as XML, HTML, etc.) should contain appropriate copyright and license notices as well as information on each contribution.

Copyright holders are legal entities: either individuals or companies. Note that employment contracts very often stipulate that the intellectual property developed by an employee is the property of the company (in this case, the company should be listed as the copyright holder, not the individual; the individual should still be listed as an author).

Note: An Eclipse Foundation open source project is not a legal entity. Further, the Eclipse Foundation does not assume ownership of contributions (the Eclipse Foundation is only a copyright holder in those cases where an employee of the Eclipse Foundation has authored the contribution).

Copyright statements take the form Copyright (c) {year} {owner}.

The {year} is the year in which the content was created (e.g.,“2004”).

The {owner} is the name of the copyright holder. If the content is subsequently modified and appended to by other copyright owners, the words “and others” are typically appended. So for example: “XYZ Corp.” or “XYZ Corp. and others”. The words “and others” are used to avoid having to list every copyright owner and because often, most of the content in the file was contributed by the initial copyright owner with subsequent modifications by others being smaller. However, especially if the number of copyright owners is small (e.g.,two), they may all be listed in a single copyright statement (for example: “XYZ Corp., John Smith, and ABC Enterprises.”). Alternatively, additional copyright holders may be added by including multiple copyright statements.

Copyright headers can take one of two forms. In the traditional form, the identities of the copyright holders must be indicated in the copyright statement on the first line of the header.

Eclipse Public License 2.0 Copyright and License Header template

/********************************************************************************
 * Copyright (c) {year} {owner}[ and others] (1)
 *
 * This program and the accompanying materials are made available under the (2)
 * terms of the Eclipse Public License 2.0 which is available at
 * https://www.eclipse.org/legal/epl-2.0.
 *
 * SPDX-License-Identifier: EPL-2.0 (3)
 *
 * Contributors: (4)
 *   {name} - initial API and implementation
 ********************************************************************************/
  1. Name of the initial copyright owner (this must be a legal entity); other organisations that have contributed are either listed individually or grouped together by appending “and others”. The {year} is the year of the initial creation.
  2. Declared project licenses described in human readable form.
  3. Declared project licenses indicated using SPDX codes and expressions.
  4. The names of the contributors and the nature of their contribution (this section may be excluded).

Contributors should be consistent when expressing copyright on a particular file. In some legal circles, the exact form of the copyright message must be used in summaries, including punctuation (e.g.,the “Copyright (c) 2017 My Company, Inc” and “Copyright (c) 2017 My Company, Inc.” may be considered different and distinct because of the period).

Note: Older versions of this template included the sentence “All rights reserved.” It is not wrong for this sentence to be included in the header; it is just not necessary. File headers that include this sentence do not need to be changed.

Alternatively, project teams can adopt a more generic copyright header for each file and include the identities of the copyright holders in the notice file.

Alternative Eclipse Public License 2.0 Copyright and License Header template

/********************************************************************************
 * Copyright (c) {year} Contributors to the Eclipse Foundation (1)
 *
 * See the NOTICE file(s) distributed with this work for additional (2)
 * information regarding copyright ownership.
 *
 * This program and the accompanying materials are made available under the (3)
 * terms of the Eclipse Public License 2.0 which is available at
 * https://www.eclipse.org/legal/epl-2.0
 *
 * SPDX-License-Identifier: EPL-2.0 (4)
 ********************************************************************************/
  1. The {year} is the year of the initial creation
  2. Statement that indicates where the actual copyright information is located.
  3. Declared project licenses described in human readable form.
  4. Declared project licenses indicated using SPDX codes and expressions.

Note: The border, line breaks, etc. are not mandated in either form.

Incorporating the SPDX-License-Identifier tag in the header makes it easy for automated tools to discover and report the license of the content. More usefully, the SPDX expression syntax can be used to make it very explicit to automated tools how multiple licenses are combined.

In SPDX, disjunction is used to express dual licensing and conjunction is used to express that the content contains content that is distributed simultaneously under multiple licenses. For example, EPL-2.0 OR MIT expresses that the consumer may choose to accept the content under one of the licenses listed; and EPL-2.0 AND MIT indicates that the consumer must accept the content under both licenses (it may be the case that parts of the content are under one license and other parts are under the other).

Example Copyright and License Header for Dual-licensed Content

/********************************************************************************
 * Copyright (c) {year} {owner}[ and others]
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * https://www.eclipse.org/legal/epl-2.0, or the Apache Software License 2.0
 * which is available at https://www.apache.org/licenses/LICENSE-2.0.
 *
 * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
 ********************************************************************************/