@@ -151,6 +151,7 @@ enum class SpdxLicense( |
151 | 151 | EPL_1_0("Eclipse Public License 1.0", "EPL-1.0"), |
152 | 152 | EPL_2_0("Eclipse Public License 2.0", "EPL-2.0", "epl_2_0", customMatcher = { _, url -> |
153 | 153 | url == "https://www.eclipse.org/legal/epl-v20.html" |
| 154 | + || url == "https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt" |
154 | 155 | }), |
155 | 156 | ErlPL_1_1("Erlang Public License v1.1", "ErlPL-1.1"), |
156 | 157 | etalab_2_0("Etalab Open License 2.0", "etalab-2.0"), |
@@ -392,19 +393,19 @@ enum class SpdxLicense( |
392 | 393 |
|
393 | 394 | // Special handling section |
394 | 395 | Apache_2_0("Apache License 2.0", "Apache-2.0", customMatcher = { name, url -> |
395 | | - name.contains("Apache", true) || url?.endsWith("LICENSE-2.0.txt") == true |
| 396 | + name.contains("Apache", true) |
| 397 | + || url?.endsWith("LICENSE-2.0.txt") == true |
396 | 398 | }), |
397 | 399 | BSD_2_Clause("BSD 2-Clause \"Simplified\" License", "BSD-2-Clause", customMatcher = { name, url -> |
398 | 400 | name.equals("BSD 2-Clause License", true) |
399 | 401 | || url?.endsWith("opensource.org/licenses/BSD-2-Clause", true) == true |
400 | 402 | || url?.endsWith("opensource.org/licenses/bsd-license", true) == true |
401 | 403 | }), |
402 | 404 | BSD_3_Clause("BSD 3-Clause \"New\" or \"Revised\" License", "BSD-3-Clause", customMatcher = { name, url -> |
403 | | - name.equals("New BSD License", true) || name.equals("Modified BSD License", true) || name.equals( |
404 | | - "BSD 3-clause", |
405 | | - true |
406 | | - ) || |
407 | | - url?.endsWith("opensource.org/licenses/BSD-3-Clause", true) == true |
| 405 | + name.equals("New BSD License", true) |
| 406 | + || name.equals("Modified BSD License", true) |
| 407 | + || name.equals("BSD 3-clause", true) |
| 408 | + || url?.endsWith("opensource.org/licenses/BSD-3-Clause", true) == true |
408 | 409 | }), |
409 | 410 | MIT("MIT License", "MIT", customMatcher = { name, _ -> |
410 | 411 | name.contains("MIT", true) |
@@ -426,7 +427,10 @@ enum class SpdxLicense( |
426 | 427 | GPL_2_0_CPE( |
427 | 428 | "GNU General Public License, version 2, with the Classpath Exception", |
428 | 429 | "GPL-2.0-CPE", |
429 | | - customUrl = "https://openjdk.org/legal/gplv2+ce.html" |
| 430 | + customUrl = "https://openjdk.org/legal/gplv2+ce.html", |
| 431 | + customMatcher = { name, url -> |
| 432 | + url?.equals("https://www.gnu.org/software/classpath/license.html") == true |
| 433 | + } |
430 | 434 | ); |
431 | 435 |
|
432 | 436 | fun getUrl(): String = customUrl ?: "https://spdx.org/licenses/$id.html" |
|