[Rename] Change license header and copyright notice to SPDX (#437)
This commit changes the oss-license-header.txt file from the legacy ASLv2 header to the new SPDX format. It also updates the ide gradle file and LicenseHeaderTask of precommit to accept the new SPDX license format. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
This commit is contained in:
parent
f27eb8a98c
commit
49907793f3
|
@ -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
|
||||
|
@ -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.")
|
||||
}
|
||||
|
||||
// Generated resources
|
||||
substringMatcher(licenseFamilyCategory: "GEN ",
|
||||
licenseFamilyName: "Generated") {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue