From ee758fa6704c5c2a03ed4426f4f164b72dd99b37 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 15 May 2020 15:36:22 +0100 Subject: [PATCH] Use HTTPS for license links This commit updates the MavenPublishingConventions to use HTTPS to link to the Apache license. The configuration of NoHTTP has also been reworked so that it will correctly find usch uses of http:// URLs. Closes gh-21459 --- build.gradle | 6 ++++++ .../springframework/boot/build/JavaConventions.java | 2 -- .../boot/build/MavenPublishingConventions.java | 2 +- .../src/maven/resources/pom.xml | 2 +- src/checkstyle/nohttp-checkstyle.xml | 7 ------- src/nohttp/checkstyle.xml | 13 +++++++++++++ .../suppressions.xml} | 2 -- .../nohttp-whitelist.txt => nohttp/whitelist.lines} | 0 8 files changed, 21 insertions(+), 13 deletions(-) delete mode 100644 src/checkstyle/nohttp-checkstyle.xml create mode 100644 src/nohttp/checkstyle.xml rename src/{checkstyle/nohttp-checkstyle-suppressions.xml => nohttp/suppressions.xml} (83%) rename src/{checkstyle/nohttp-whitelist.txt => nohttp/whitelist.lines} (100%) diff --git a/build.gradle b/build.gradle index 92d2ae41427..720d0c74c14 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,17 @@ plugins { id "org.jetbrains.kotlin.jvm" apply false // https://youtrack.jetbrains.com/issue/KT-30276 + id "io.spring.nohttp" version "0.0.3.RELEASE" } description = "Spring Boot Build" defaultTasks 'build' +nohttp { + whitelistFile = project.file("src/nohttp/whitelist.lines") + source.exclude "buildSrc/build/**" +} + allprojects { group "org.springframework.boot" diff --git a/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java b/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java index 201ed3ec411..b43ee670994 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java @@ -164,8 +164,6 @@ class JavaConventions { DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies(); checkstyleDependencies .add(project.getDependencies().create("io.spring.javaformat:spring-javaformat-checkstyle:" + version)); - checkstyleDependencies - .add(project.getDependencies().create("io.spring.nohttp:nohttp-checkstyle:0.0.3.RELEASE")); } void copyLegalFiles(Project project, CopySpec metaInf) { diff --git a/buildSrc/src/main/java/org/springframework/boot/build/MavenPublishingConventions.java b/buildSrc/src/main/java/org/springframework/boot/build/MavenPublishingConventions.java index 2a447dd5e59..098ebf59e83 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/MavenPublishingConventions.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/MavenPublishingConventions.java @@ -90,7 +90,7 @@ class MavenPublishingConventions { private void customizeLicences(MavenPomLicenseSpec licences) { licences.license((licence) -> { licence.getName().set("Apache License, Version 2.0"); - licence.getUrl().set("http://www.apache.org/licenses/LICENSE-2.0"); + licence.getUrl().set("https://www.apache.org/licenses/LICENSE-2.0"); }); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/maven/resources/pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/maven/resources/pom.xml index 9a7c8e0cde5..559dd6235ee 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/maven/resources/pom.xml +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/maven/resources/pom.xml @@ -1,6 +1,6 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.springframework.boot spring-boot-maven-plugin diff --git a/src/checkstyle/nohttp-checkstyle.xml b/src/checkstyle/nohttp-checkstyle.xml deleted file mode 100644 index 3865174ebf9..00000000000 --- a/src/checkstyle/nohttp-checkstyle.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/nohttp/checkstyle.xml b/src/nohttp/checkstyle.xml new file mode 100644 index 00000000000..be81bdb8ee9 --- /dev/null +++ b/src/nohttp/checkstyle.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/checkstyle/nohttp-checkstyle-suppressions.xml b/src/nohttp/suppressions.xml similarity index 83% rename from src/checkstyle/nohttp-checkstyle-suppressions.xml rename to src/nohttp/suppressions.xml index e9e5c6e528a..69575ea3f59 100644 --- a/src/checkstyle/nohttp-checkstyle-suppressions.xml +++ b/src/nohttp/suppressions.xml @@ -4,10 +4,8 @@ "https://checkstyle.org/dtds/suppressions_1_2.dtd"> - - diff --git a/src/checkstyle/nohttp-whitelist.txt b/src/nohttp/whitelist.lines similarity index 100% rename from src/checkstyle/nohttp-whitelist.txt rename to src/nohttp/whitelist.lines