Skip to content

Commit 1c2fc09

Browse files
author
Maxime Gréau
committed
Fix Licenses values for CDDL and Custom URL (#27999)
* Fix license SPDX identifiers (CDDL) * Fix license type for Custom URL: * If the license is identified but not listed as an SPDX identifier, the character `;` is used after the identifier to set the license URL.
1 parent 02ed139 commit 1c2fc09

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/DependenciesInfoTask.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public class DependenciesInfoTask extends DefaultTask {
8888
* <u>
8989
* <li><em>UNKNOWN</em> if LICENSE file is not present for this dependency.</li>
9090
* <li><em>one SPDX identifier</em> if the LICENSE content matches with an SPDX license.</li>
91-
* <li><em>Custom:URL</em> if it's not an SPDX license,
91+
* <li><em>Custom;URL</em> if it's not an SPDX license,
9292
* URL is the Github URL to the LICENSE file in elasticsearch repository.</li>
9393
* </ul>
9494
*
@@ -116,7 +116,7 @@ public class DependenciesInfoTask extends DefaultTask {
116116
// As we have the license file, we create a Custom entry with the URL to this license file.
117117
final gitBranch = System.getProperty('build.branch', 'master')
118118
final String githubBaseURL = "https://raw.githubusercontent.com/elastic/elasticsearch/${gitBranch}/"
119-
return "Custom:${license.getCanonicalPath().replaceFirst('.*/elasticsearch/', githubBaseURL)}"
119+
return "Custom;${license.getCanonicalPath().replaceFirst('.*/elasticsearch/', githubBaseURL)}"
120120
}
121121
return spdx
122122
} else {
@@ -156,10 +156,10 @@ public class DependenciesInfoTask extends DefaultTask {
156156
spdx = 'LGPL-3.0'
157157
break
158158
case ~/.*${CDDL_1_0}.*/:
159-
spdx = 'CDDL_1_0'
159+
spdx = 'CDDL-1.0'
160160
break
161161
case ~/.*${CDDL_1_1}.*/:
162-
spdx = 'CDDL_1_1'
162+
spdx = 'CDDL-1.1'
163163
break
164164
case ~/.*${ICU}.*/:
165165
spdx = 'ICU'

0 commit comments

Comments
 (0)