From 1bd1ef6117c68b58a94859e7d7dfc3fff66f4925 Mon Sep 17 00:00:00 2001 From: Vladimir Sitnikov Date: Sat, 29 Apr 2023 11:15:25 +0300 Subject: [PATCH] doc: use SPDX license identifiers in pom.xml and in Bundle-License attribute Fixes https://github.com/hamcrest/JavaHamcrest/issues/264 See also https://github.com/hamcrest/JavaHamcrest/pull/396 --- build.gradle | 6 ++++-- hamcrest-core/hamcrest-core.gradle | 1 + hamcrest-library/hamcrest-library.gradle | 1 + hamcrest/hamcrest.gradle | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index ae063fc61..ed6c3abe8 100644 --- a/build.gradle +++ b/build.gradle @@ -71,8 +71,10 @@ def pomConfigurationFor(String pomName, String pomDescription) { licenses { license { - name = 'BSD License 3' - url = 'http://opensource.org/licenses/BSD-3-Clause' + name = 'BSD-3-Clause' + // The file includes copyright text, so URL like http://opensource.org/licenses/BSD-3-Clause can't + // be used here. + url = 'https://raw.githubusercontent.com/hamcrest/JavaHamcrest/e4b9afdc2624bbebef3c7c739e6074ecd8a6c06e/LICENSE.txt' } } diff --git a/hamcrest-core/hamcrest-core.gradle b/hamcrest-core/hamcrest-core.gradle index d2a91f8ed..4ea90cbc6 100644 --- a/hamcrest-core/hamcrest-core.gradle +++ b/hamcrest-core/hamcrest-core.gradle @@ -7,6 +7,7 @@ jar { attributes 'Implementation-Title': project.name, 'Implementation-Vendor': 'hamcrest.org', 'Implementation-Version': version, + 'Bundle-License': 'BSD-3-Clause', 'Automatic-Module-Name': 'org.hamcrest.core.deprecated' } } diff --git a/hamcrest-library/hamcrest-library.gradle b/hamcrest-library/hamcrest-library.gradle index fd8d19d16..e1c62b956 100644 --- a/hamcrest-library/hamcrest-library.gradle +++ b/hamcrest-library/hamcrest-library.gradle @@ -7,6 +7,7 @@ jar { attributes 'Implementation-Title': project.name, 'Implementation-Vendor': 'hamcrest.org', 'Implementation-Version': version, + 'Bundle-License': 'BSD-3-Clause', 'Automatic-Module-Name': 'org.hamcrest.library.deprecated' } } diff --git a/hamcrest/hamcrest.gradle b/hamcrest/hamcrest.gradle index 52d86526b..040b78ecf 100644 --- a/hamcrest/hamcrest.gradle +++ b/hamcrest/hamcrest.gradle @@ -13,6 +13,7 @@ jar { attributes 'Implementation-Title': project.name, 'Implementation-Vendor': 'hamcrest.org', 'Implementation-Version': version, + 'Bundle-License': 'BSD-3-Clause', 'Automatic-Module-Name': 'org.hamcrest' instruction 'Import-Package', '''javax.xml.namespace; resolution:=optional, javax.xml.xpath; resolution:=optional,