Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rename] Change license header and copyright notice to SPDX #437

Merged
merged 2 commits into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class LicenseHeadersTask extends AntTask {

/** Allowed license families for this project. */
@Input
List<String> approvedLicenses = ['Apache', 'Generated', 'Vendored']
List<String> approvedLicenses = ['Apache', 'Generated', 'SPDX', 'Vendored']

/**
* Files that should be excluded from the license header check. Use with extreme care, only in situations where the license on the
Expand Down Expand Up @@ -121,6 +121,13 @@ class LicenseHeadersTask extends AntTask {
pattern(substring: "Licensed to Elasticsearch under one or more contributor")
}

// SPDX
substringMatcher(licenseFamilyCategory: "SPDX ",
licenseFamilyName: "SPDX") {
// Apache license (OpenSearch)
pattern(substring: "Copyright OpenSearch Contributors.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be Copyright 2021 OpenSearch Contributors?

Copy link
Collaborator Author

@nknize nknize Mar 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it was generally advised that the year is not needed in the header so it was intentionally left off

}

// Generated resources
substringMatcher(licenseFamilyCategory: "GEN ",
licenseFamilyName: "Generated") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,2 @@
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch 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.
*/
// Copyright OpenSearch Contributors.
// SPDX-License-Identifier: Apache-2.0
21 changes: 3 additions & 18 deletions gradle/ide.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,12 @@ if (System.getProperty('idea.active') == 'true') {
}
copyright {
useDefault = 'Apache'
scopes = ['x-pack': 'Elastic']
profiles {
Apache {
keyword = 'Licensed to OpenSearch under one or more contributor'
keyword = 'Copyright OpenSearch Contributors.'
notice = '''\
Licensed to OpenSearch under one or more contributor
license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright
ownership. OpenSearch 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.'''.stripIndent()
Copyright OpenSearch Contributors.
SPDX-License-Identifier: Apache-2.0'''.stripIndent()
}
}
}
Expand Down