From 9af19370a69bd4395e51a4e349012198d64109a8 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 10 May 2023 10:06:26 -0700 Subject: [PATCH] Backport build and CI concerns Backport build and CI concerns primarily related to repo.spring.io changes and Docker config. --- .../boot/build/AsciidoctorConventions.java | 7 +- .../artifactory/ArtifactoryRepository.java | 60 ------------- .../boot/build/artifacts/ArtifactRelease.java | 74 +++++++++++++++ .../AbstractPackageManagerDefinitionTask.java | 19 ++-- .../ArtifactoryRepositoryTests.java | 60 ------------- .../build/artifacts/ArtifactReleaseTests.java | 90 +++++++++++++++++++ ci/images/ci-image-jdk11/Dockerfile | 4 +- ci/images/ci-image-jdk17/Dockerfile | 4 +- ci/images/ci-image-jdk18/Dockerfile | 4 +- ci/images/ci-image/Dockerfile | 3 +- .../releasescripts/sdkman/SdkmanService.java | 2 +- .../sdkman/SdkmanServiceTests.java | 6 +- ci/parameters.yml | 3 - ci/pipeline.yml | 47 +++++----- ci/scripts/detect-jdk-updates.sh | 4 +- ci/scripts/detect-ubuntu-image-updates.sh | 4 +- ci/scripts/update-homebrew-tap.sh | 2 +- ci/tasks/build-ci-image.yml | 6 +- ci/tasks/build-project-windows.yml | 1 + ci/tasks/build-project.yml | 15 ++-- ci/tasks/generate-changelog.yml | 8 +- ci/tasks/stage.yml | 1 + eclipse/eclipse.properties | 2 +- eclipse/spring-boot-project.setup | 31 +++++-- .../src/main/homebrew/spring-boot.rb | 2 +- .../src/main/scoop/springboot.json | 2 +- .../grape/MavenResolverGrapeEngineTests.java | 2 +- .../src/docs/asciidoc/attributes.adoc | 2 +- .../getting-started/first-application.adoc | 4 +- .../asciidoc/getting-started/installing.adoc | 13 +-- .../src/docs/asciidoc/getting-started.adoc | 6 +- .../docs/asciidoc/managing-dependencies.adoc | 6 +- 32 files changed, 278 insertions(+), 216 deletions(-) delete mode 100644 buildSrc/src/main/java/org/springframework/boot/build/artifactory/ArtifactoryRepository.java create mode 100644 buildSrc/src/main/java/org/springframework/boot/build/artifacts/ArtifactRelease.java delete mode 100644 buildSrc/src/test/java/org/springframework/boot/build/artifactory/ArtifactoryRepositoryTests.java create mode 100644 buildSrc/src/test/java/org/springframework/boot/build/artifacts/ArtifactReleaseTests.java diff --git a/buildSrc/src/main/java/org/springframework/boot/build/AsciidoctorConventions.java b/buildSrc/src/main/java/org/springframework/boot/build/AsciidoctorConventions.java index a3b48a72475..a9614e1fd7d 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/AsciidoctorConventions.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/AsciidoctorConventions.java @@ -30,7 +30,7 @@ import org.gradle.api.Project; import org.gradle.api.tasks.PathSensitivity; import org.gradle.api.tasks.Sync; -import org.springframework.boot.build.artifactory.ArtifactoryRepository; +import org.springframework.boot.build.artifacts.ArtifactRelease; import org.springframework.util.StringUtils; /** @@ -66,6 +66,7 @@ import org.springframework.util.StringUtils; * * * @author Andy Wilkinson + * @author Scott Frederick */ class AsciidoctorConventions { @@ -128,10 +129,12 @@ class AsciidoctorConventions { } private void configureCommonAttributes(Project project, AbstractAsciidoctorTask asciidoctorTask) { + ArtifactRelease artifacts = ArtifactRelease.forProject(project); Map attributes = new HashMap<>(); attributes.put("attribute-missing", "warn"); attributes.put("github-tag", determineGitHubTag(project)); - attributes.put("spring-boot-artifactory-repo", ArtifactoryRepository.forProject(project)); + attributes.put("artifact-release-type", artifacts.getType()); + attributes.put("artifact-download-repo", artifacts.getDownloadRepo()); attributes.put("revnumber", null); asciidoctorTask.attributes(attributes); } diff --git a/buildSrc/src/main/java/org/springframework/boot/build/artifactory/ArtifactoryRepository.java b/buildSrc/src/main/java/org/springframework/boot/build/artifactory/ArtifactoryRepository.java deleted file mode 100644 index 12c9b7f8bb6..00000000000 --- a/buildSrc/src/main/java/org/springframework/boot/build/artifactory/ArtifactoryRepository.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2012-2020 the original author or authors. - * - * Licensed 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 - * - * https://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. - */ - -package org.springframework.boot.build.artifactory; - -import org.gradle.api.Project; - -/** - * An Artifactory repository to which a build of Spring Boot can be published. - * - * @author Andy Wilkinson - */ -public final class ArtifactoryRepository { - - private final String name; - - private ArtifactoryRepository(String name) { - this.name = name; - } - - public String getName() { - return this.name; - } - - @Override - public String toString() { - return this.name; - } - - public static ArtifactoryRepository forProject(Project project) { - return new ArtifactoryRepository(determineArtifactoryRepo(project)); - } - - private static String determineArtifactoryRepo(Project project) { - String version = project.getVersion().toString(); - int modifierIndex = version.lastIndexOf('-'); - if (modifierIndex == -1) { - return "release"; - } - String type = version.substring(modifierIndex + 1); - if (type.startsWith("M") || type.startsWith("RC")) { - return "milestone"; - } - return "snapshot"; - } - -} diff --git a/buildSrc/src/main/java/org/springframework/boot/build/artifacts/ArtifactRelease.java b/buildSrc/src/main/java/org/springframework/boot/build/artifacts/ArtifactRelease.java new file mode 100644 index 00000000000..31a74a56c74 --- /dev/null +++ b/buildSrc/src/main/java/org/springframework/boot/build/artifacts/ArtifactRelease.java @@ -0,0 +1,74 @@ +/* + * Copyright 2012-2020 the original author or authors. + * + * Licensed 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 + * + * https://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. + */ + +package org.springframework.boot.build.artifacts; + +import org.gradle.api.Project; + +/** + * Information about artifacts produced by a build. + * + * @author Andy Wilkinson + * @author Scott Frederick + */ +public final class ArtifactRelease { + + private static final String SNAPSHOT = "snapshot"; + + private static final String MILESTONE = "milestone"; + + private static final String RELEASE = "release"; + + private static final String SPRING_REPO = "https://repo.spring.io/%s"; + + private static final String MAVEN_REPO = "https://repo.maven.apache.org/maven2"; + + private final String type; + + private ArtifactRelease(String type) { + this.type = type; + } + + public String getType() { + return this.type; + } + + public String getDownloadRepo() { + return (this.isRelease()) ? MAVEN_REPO : String.format(SPRING_REPO, this.getType()); + } + + public boolean isRelease() { + return RELEASE.equals(this.type); + } + + public static ArtifactRelease forProject(Project project) { + return new ArtifactRelease(determineReleaseType(project)); + } + + private static String determineReleaseType(Project project) { + String version = project.getVersion().toString(); + int modifierIndex = version.lastIndexOf('-'); + if (modifierIndex == -1) { + return RELEASE; + } + String type = version.substring(modifierIndex + 1); + if (type.startsWith("M") || type.startsWith("RC")) { + return MILESTONE; + } + return SNAPSHOT; + } + +} diff --git a/buildSrc/src/main/java/org/springframework/boot/build/cli/AbstractPackageManagerDefinitionTask.java b/buildSrc/src/main/java/org/springframework/boot/build/cli/AbstractPackageManagerDefinitionTask.java index b2d4ea1f90e..e6903d1b8c5 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/cli/AbstractPackageManagerDefinitionTask.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/cli/AbstractPackageManagerDefinitionTask.java @@ -23,6 +23,7 @@ import java.util.Map; import org.apache.commons.codec.digest.DigestUtils; import org.gradle.api.DefaultTask; +import org.gradle.api.Project; import org.gradle.api.file.RegularFile; import org.gradle.api.provider.Provider; import org.gradle.api.tasks.InputFile; @@ -31,13 +32,14 @@ import org.gradle.api.tasks.PathSensitive; import org.gradle.api.tasks.PathSensitivity; import org.gradle.api.tasks.TaskExecutionException; -import org.springframework.boot.build.artifactory.ArtifactoryRepository; +import org.springframework.boot.build.artifacts.ArtifactRelease; /** * Base class for generating a package manager definition file such as a Scoop manifest or * a Homebrew formula. * * @author Andy Wilkinson + * @author Phillip Webb */ public abstract class AbstractPackageManagerDefinitionTask extends DefaultTask { @@ -84,14 +86,19 @@ public abstract class AbstractPackageManagerDefinitionTask extends DefaultTask { getProject().copy((copy) -> { copy.from(this.template); copy.into(this.outputDir); - Map properties = new HashMap<>(additionalProperties); - properties.put("hash", sha256(this.archive.get().getAsFile())); - properties.put("repo", ArtifactoryRepository.forProject(getProject())); - properties.put("project", getProject()); - copy.expand(properties); + copy.expand(getProperties(additionalProperties)); }); } + private Map getProperties(Map additionalProperties) { + Map properties = new HashMap<>(additionalProperties); + Project project = getProject(); + properties.put("hash", sha256(this.archive.get().getAsFile())); + properties.put("repo", ArtifactRelease.forProject(project).getDownloadRepo()); + properties.put("project", project); + return properties; + } + private String sha256(File file) { try { MessageDigest digest = MessageDigest.getInstance("SHA-256"); diff --git a/buildSrc/src/test/java/org/springframework/boot/build/artifactory/ArtifactoryRepositoryTests.java b/buildSrc/src/test/java/org/springframework/boot/build/artifactory/ArtifactoryRepositoryTests.java deleted file mode 100644 index f878e1afdf4..00000000000 --- a/buildSrc/src/test/java/org/springframework/boot/build/artifactory/ArtifactoryRepositoryTests.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2012-2021 the original author or authors. - * - * Licensed 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 - * - * https://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. - */ - -package org.springframework.boot.build.artifactory; - -import org.gradle.api.Project; -import org.gradle.testfixtures.ProjectBuilder; -import org.junit.jupiter.api.Test; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Tests for {@link ArtifactoryRepository}. - * - * @author Andy Wilkinson - */ -class ArtifactoryRepositoryTests { - - @Test - void whenProjectVersionIsMilestoneThenRepositoryIsMilestone() { - Project project = ProjectBuilder.builder().build(); - project.setVersion("1.2.3-M1"); - assertThat(ArtifactoryRepository.forProject(project).getName()).isEqualTo("milestone"); - } - - @Test - void whenProjectVersionIsReleaseCandidateThenRepositoryIsMilestone() { - Project project = ProjectBuilder.builder().build(); - project.setVersion("1.2.3-RC1"); - assertThat(ArtifactoryRepository.forProject(project).getName()).isEqualTo("milestone"); - } - - @Test - void whenProjectVersionIsReleaseThenRepositoryIsRelease() { - Project project = ProjectBuilder.builder().build(); - project.setVersion("1.2.3"); - assertThat(ArtifactoryRepository.forProject(project).getName()).isEqualTo("release"); - } - - @Test - void whenProjectVersionIsSnapshotThenRepositoryIsSnapshot() { - Project project = ProjectBuilder.builder().build(); - project.setVersion("1.2.3-SNAPSHOT"); - assertThat(ArtifactoryRepository.forProject(project).getName()).isEqualTo("snapshot"); - } - -} diff --git a/buildSrc/src/test/java/org/springframework/boot/build/artifacts/ArtifactReleaseTests.java b/buildSrc/src/test/java/org/springframework/boot/build/artifacts/ArtifactReleaseTests.java new file mode 100644 index 00000000000..0a9d5e420a7 --- /dev/null +++ b/buildSrc/src/test/java/org/springframework/boot/build/artifacts/ArtifactReleaseTests.java @@ -0,0 +1,90 @@ +/* + * Copyright 2012-2021 the original author or authors. + * + * Licensed 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 + * + * https://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. + */ + +package org.springframework.boot.build.artifacts; + +import org.gradle.api.Project; +import org.gradle.testfixtures.ProjectBuilder; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Tests for {@link ArtifactRelease}. + * + * @author Andy Wilkinson + * @author Scott Frederick + */ +class ArtifactReleaseTests { + + @Test + void whenProjectVersionIsSnapshotThenTypeIsSnapshot() { + Project project = ProjectBuilder.builder().build(); + project.setVersion("1.2.3-SNAPSHOT"); + assertThat(ArtifactRelease.forProject(project).getType()).isEqualTo("snapshot"); + } + + @Test + void whenProjectVersionIsMilestoneThenTypeIsMilestone() { + Project project = ProjectBuilder.builder().build(); + project.setVersion("1.2.3-M1"); + assertThat(ArtifactRelease.forProject(project).getType()).isEqualTo("milestone"); + } + + @Test + void whenProjectVersionIsReleaseCandidateThenTypeIsMilestone() { + Project project = ProjectBuilder.builder().build(); + project.setVersion("1.2.3-RC1"); + assertThat(ArtifactRelease.forProject(project).getType()).isEqualTo("milestone"); + } + + @Test + void whenProjectVersionIsReleaseThenTypeIsRelease() { + Project project = ProjectBuilder.builder().build(); + project.setVersion("1.2.3"); + assertThat(ArtifactRelease.forProject(project).getType()).isEqualTo("release"); + } + + @Test + void whenProjectVersionIsSnapshotThenRepositoryIsArtifactorySnapshot() { + Project project = ProjectBuilder.builder().build(); + project.setVersion("1.2.3-SNAPSHOT"); + assertThat(ArtifactRelease.forProject(project).getDownloadRepo()).contains("repo.spring.io/snapshot"); + } + + @Test + void whenProjectVersionIsMilestoneThenRepositoryIsArtifactoryMilestone() { + Project project = ProjectBuilder.builder().build(); + project.setVersion("1.2.3-M1"); + assertThat(ArtifactRelease.forProject(project).getDownloadRepo()).contains("repo.spring.io/milestone"); + } + + @Test + void whenProjectVersionIsReleaseCandidateThenRepositoryIsArtifactoryMilestone() { + Project project = ProjectBuilder.builder().build(); + project.setVersion("1.2.3-RC1"); + assertThat(ArtifactRelease.forProject(project).getDownloadRepo()).contains("repo.spring.io/milestone"); + } + + @Test + void whenProjectVersionIsReleaseThenRepositoryIsMavenCentral() { + Project project = ProjectBuilder.builder().build(); + project.setVersion("1.2.3"); + assertThat(ArtifactRelease.forProject(project).getDownloadRepo()) + .contains("https://repo.maven.apache.org/maven2"); + } + +} diff --git a/ci/images/ci-image-jdk11/Dockerfile b/ci/images/ci-image-jdk11/Dockerfile index 2107cfce18a..714275083cd 100644 --- a/ci/images/ci-image-jdk11/Dockerfile +++ b/ci/images/ci-image-jdk11/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal-20220426 +FROM ubuntu:focal-20220922 ADD setup.sh /setup.sh ADD get-jdk-url.sh /get-jdk-url.sh @@ -8,5 +8,3 @@ RUN ./setup.sh java11 ENV JAVA_HOME /opt/openjdk ENV PATH $JAVA_HOME/bin:$PATH ADD docker-lib.sh /docker-lib.sh - -ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ] diff --git a/ci/images/ci-image-jdk17/Dockerfile b/ci/images/ci-image-jdk17/Dockerfile index 289066d61eb..216f1487fdd 100644 --- a/ci/images/ci-image-jdk17/Dockerfile +++ b/ci/images/ci-image-jdk17/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal-20220426 +FROM ubuntu:focal-20220922 ADD setup.sh /setup.sh ADD get-jdk-url.sh /get-jdk-url.sh @@ -8,5 +8,3 @@ RUN ./setup.sh java8 java17 ENV JAVA_HOME /opt/openjdk ENV PATH $JAVA_HOME/bin:$PATH ADD docker-lib.sh /docker-lib.sh - -ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ] diff --git a/ci/images/ci-image-jdk18/Dockerfile b/ci/images/ci-image-jdk18/Dockerfile index f76acac35f0..b38a98f2dcb 100644 --- a/ci/images/ci-image-jdk18/Dockerfile +++ b/ci/images/ci-image-jdk18/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal-20220426 +FROM ubuntu:focal-20220922 ADD setup.sh /setup.sh ADD get-jdk-url.sh /get-jdk-url.sh @@ -8,5 +8,3 @@ RUN ./setup.sh java8 java18 ENV JAVA_HOME /opt/openjdk ENV PATH $JAVA_HOME/bin:$PATH ADD docker-lib.sh /docker-lib.sh - -ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ] diff --git a/ci/images/ci-image/Dockerfile b/ci/images/ci-image/Dockerfile index 52b60e363b4..0418aa95cdd 100644 --- a/ci/images/ci-image/Dockerfile +++ b/ci/images/ci-image/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal-20220426 +FROM ubuntu:focal-20220922 ADD setup.sh /setup.sh ADD get-jdk-url.sh /get-jdk-url.sh @@ -12,4 +12,3 @@ ADD docker-lib.sh /docker-lib.sh ADD build-release-scripts.sh /build-release-scripts.sh ADD releasescripts /release-scripts RUN ./build-release-scripts.sh -ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ] diff --git a/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/sdkman/SdkmanService.java b/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/sdkman/SdkmanService.java index c0e38cc0bef..897df837f85 100644 --- a/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/sdkman/SdkmanService.java +++ b/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/sdkman/SdkmanService.java @@ -40,7 +40,7 @@ public class SdkmanService { private static final String SDKMAN_URL = "https://vendors.sdkman.io/"; - private static final String DOWNLOAD_URL = "https://repo.spring.io/simple/libs-release-local/org/springframework/boot/spring-boot-cli/" + private static final String DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-cli/" + "%s/spring-boot-cli-%s-bin.zip"; private static final String CHANGELOG_URL = "https://github.com/spring-projects/spring-boot/releases/tag/v%s"; diff --git a/ci/images/releasescripts/src/test/java/io/spring/concourse/releasescripts/sdkman/SdkmanServiceTests.java b/ci/images/releasescripts/src/test/java/io/spring/concourse/releasescripts/sdkman/SdkmanServiceTests.java index 419392e523c..3a81ecfd3f2 100644 --- a/ci/images/releasescripts/src/test/java/io/spring/concourse/releasescripts/sdkman/SdkmanServiceTests.java +++ b/ci/images/releasescripts/src/test/java/io/spring/concourse/releasescripts/sdkman/SdkmanServiceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,7 +55,7 @@ class SdkmanServiceTests { @Test void publishWhenMakeDefaultTrue() { setupExpectation("https://vendors.sdkman.io/release", - "{\"candidate\": \"springboot\", \"version\": \"1.2.3\", \"url\": \"https://repo.spring.io/simple/libs-release-local/org/springframework/boot/spring-boot-cli/1.2.3/spring-boot-cli-1.2.3-bin.zip\"}"); + "{\"candidate\": \"springboot\", \"version\": \"1.2.3\", \"url\": \"https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-cli/1.2.3/spring-boot-cli-1.2.3-bin.zip\"}"); setupExpectation("https://vendors.sdkman.io/default", "{\"candidate\": \"springboot\", \"version\": \"1.2.3\"}", HttpMethod.PUT); setupExpectation("https://vendors.sdkman.io/announce/struct", @@ -67,7 +67,7 @@ class SdkmanServiceTests { @Test void publishWhenMakeDefaultFalse() { setupExpectation("https://vendors.sdkman.io/release", - "{\"candidate\": \"springboot\", \"version\": \"1.2.3\", \"url\": \"https://repo.spring.io/simple/libs-release-local/org/springframework/boot/spring-boot-cli/1.2.3/spring-boot-cli-1.2.3-bin.zip\"}"); + "{\"candidate\": \"springboot\", \"version\": \"1.2.3\", \"url\": \"https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-cli/1.2.3/spring-boot-cli-1.2.3-bin.zip\"}"); setupExpectation("https://vendors.sdkman.io/announce/struct", "{\"candidate\": \"springboot\", \"version\": \"1.2.3\", \"hashtag\": \"springboot\", \"url\": \"https://github.com/spring-projects/spring-boot/releases/tag/v1.2.3\"}"); this.service.publish("1.2.3", false); diff --git a/ci/parameters.yml b/ci/parameters.yml index 6e242443402..ee0919ddee6 100644 --- a/ci/parameters.yml +++ b/ci/parameters.yml @@ -1,6 +1,3 @@ -email-server: "smtp.svc.pivotal.io" -email-from: "ci@spring.io" -email-to: ["spring-boot-dev@pivotal.io"] github-repo: "https://github.com/spring-projects/spring-boot.git" github-repo-name: "spring-projects/spring-boot" homebrew-tap-repo: "https://github.com/spring-io/homebrew-tap.git" diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 2629ababbf4..dd14b4b0a91 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -7,19 +7,20 @@ anchors: registry-image-resource-source: ®istry-image-resource-source username: ((docker-hub-username)) password: ((docker-hub-password)) + ci-registry-image-resource-source: &ci-registry-image-resource-source + username: ((docker-hub-username)) + password: ((docker-hub-password)) tag: ((milestone)) - registry_mirror: - host: ((docker-hub-mirror)) - username: ((docker-hub-mirror-username)) - password: ((docker-hub-mirror-password)) gradle-enterprise-task-params: &gradle-enterprise-task-params GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) + GRADLE_ENTERPRISE_CACHE_URL: ((gradle_enterprise_cache_url)) GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username)) GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password)) docker-hub-task-params: &docker-hub-task-params DOCKER_HUB_MIRROR: ((docker-hub-mirror)) DOCKER_HUB_USERNAME: ((docker-hub-username)) DOCKER_HUB_PASSWORD: ((docker-hub-password)) + DOCKER_HUB_AUTH: ((docker-hub-auth)) github-task-params: &github-task-params GITHUB_REPO: spring-boot GITHUB_ORGANIZATION: spring-projects @@ -52,7 +53,7 @@ anchors: repo: libs-snapshot-local folder: distribution-repository build_uri: "https://ci.spring.io/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}" - build_number: "${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME}" + build_number: "${BUILD_JOB_NAME}-${BUILD_NAME}" disable_checksum_uploads: true threads: 8 artifact_set: @@ -85,41 +86,43 @@ anchors: gradle-publish-params: &gradle-publish-params GRADLE_PUBLISH_KEY: ((gradle-publish-key)) GRADLE_PUBLISH_SECRET: ((gradle-publish-secret)) - docker-hub-mirror-vars: &docker-hub-mirror-vars - docker-hub-mirror: ((docker-hub-mirror)) - docker-hub-mirror-username: ((docker-hub-mirror-username)) - docker-hub-mirror-password: ((docker-hub-mirror-password)) resource_types: - name: registry-image type: registry-image source: + <<: *registry-image-resource-source repository: concourse/registry-image-resource - tag: 1.5.0 + tag: 1.7.1 - name: artifactory-resource type: registry-image source: + <<: *registry-image-resource-source repository: springio/artifactory-resource - tag: 0.0.17 + tag: 0.0.18 - name: pull-request type: registry-image source: + <<: *registry-image-resource-source repository: teliaoss/github-pr-resource tag: v0.23.0 - name: github-status-resource type: registry-image source: + <<: *registry-image-resource-source repository: dpb587/github-status-resource tag: master - name: slack-notification type: registry-image source: + <<: *registry-image-resource-source repository: cfcommunity/slack-notification-resource tag: latest - name: github-release type: registry-image source: + <<: *registry-image-resource-source repository: concourse/github-release-resource - tag: 1.5.5 + tag: 1.8.0 resources: - name: git-repo type: git @@ -170,25 +173,25 @@ resources: type: registry-image icon: docker source: - <<: *registry-image-resource-source + <<: *ci-registry-image-resource-source repository: ((docker-hub-organization))/spring-boot-ci - name: ci-image-jdk11 type: registry-image icon: docker source: - <<: *registry-image-resource-source + <<: *ci-registry-image-resource-source repository: ((docker-hub-organization))/spring-boot-ci-jdk11 - name: ci-image-jdk17 type: registry-image icon: docker source: - <<: *registry-image-resource-source + <<: *ci-registry-image-resource-source repository: ((docker-hub-organization))/spring-boot-ci-jdk17 - name: ci-image-jdk18 type: registry-image icon: docker source: - <<: *registry-image-resource-source + <<: *ci-registry-image-resource-source repository: ((docker-hub-organization))/spring-boot-ci-jdk18 - name: artifactory-repo type: artifactory-resource @@ -198,6 +201,8 @@ resources: username: ((artifactory-username)) password: ((artifactory-password)) build_name: ((build-name)) + build_number_prefix: "${BUILD_PIPELINE_NAME}-" + check_limit: 500 - name: repo-status-build type: github-status-resource icon: eye-check-outline @@ -265,7 +270,6 @@ jobs: image: ci-image vars: ci-image-name: ci-image - <<: *docker-hub-mirror-vars - task: build-ci-image-jdk11 privileged: true file: git-repo/ci/tasks/build-ci-image.yml @@ -273,7 +277,6 @@ jobs: image: ci-image-jdk11 vars: ci-image-name: ci-image-jdk11 - <<: *docker-hub-mirror-vars - task: build-ci-image-jdk17 privileged: true file: git-repo/ci/tasks/build-ci-image.yml @@ -281,7 +284,6 @@ jobs: image: ci-image-jdk17 vars: ci-image-name: ci-image-jdk17 - <<: *docker-hub-mirror-vars - task: build-ci-image-jdk18 privileged: true file: git-repo/ci/tasks/build-ci-image.yml @@ -289,7 +291,6 @@ jobs: image: ci-image-jdk18 vars: ci-image-name: ci-image-jdk18 - <<: *docker-hub-mirror-vars - in_parallel: - put: ci-image params: @@ -625,8 +626,6 @@ jobs: RELEASE_TYPE: M GITHUB_USERNAME: ((github-username)) GITHUB_TOKEN: ((github-ci-release-token)) - vars: - <<: *docker-hub-mirror-vars - put: github-pre-release params: name: generated-changelog/tag @@ -656,8 +655,6 @@ jobs: RELEASE_TYPE: RC GITHUB_USERNAME: ((github-username)) GITHUB_TOKEN: ((github-ci-release-token)) - vars: - <<: *docker-hub-mirror-vars - put: github-pre-release params: name: generated-changelog/tag @@ -717,8 +714,6 @@ jobs: RELEASE_TYPE: RELEASE GITHUB_USERNAME: ((github-username)) GITHUB_TOKEN: ((github-ci-release-token)) - vars: - <<: *docker-hub-mirror-vars - put: github-release params: name: generated-changelog/tag diff --git a/ci/scripts/detect-jdk-updates.sh b/ci/scripts/detect-jdk-updates.sh index 3d67c7773ea..35929e94448 100755 --- a/ci/scripts/detect-jdk-updates.sh +++ b/ci/scripts/detect-jdk-updates.sh @@ -43,7 +43,7 @@ if [[ $current = $latest ]]; then exit 0; fi -milestone_response=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open ) +milestone_response=$( curl -s -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open ) milestone_result=$( jq -r -c --arg MILESTONE "$MILESTONE" '.[] | select(has("title")) | select(.title==$MILESTONE)' <<< "$milestone_response" ) if [[ ${milestone_result} = "null" || ${milestone_result} = "" ]]; then echo "Could not parse milestone: $milestone_response" @@ -51,7 +51,7 @@ if [[ ${milestone_result} = "null" || ${milestone_result} = "" ]]; then fi milestone_number=$( jq -r '.number' <<< "$milestone_result" ) -existing_tasks=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-builds\&milestone\=${milestone_number} ) +existing_tasks=$( curl -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-builds\&milestone\=${milestone_number} ) existing_jdk_issues=$( jq -r -c --arg TITLE "$ISSUE_TITLE" '.[] | select(has("title")) | select(.title==$TITLE)' <<< "$existing_tasks" ) if [[ ${existing_jdk_issues} = "" ]]; then diff --git a/ci/scripts/detect-ubuntu-image-updates.sh b/ci/scripts/detect-ubuntu-image-updates.sh index 9557a5658f2..9bc34b9299d 100755 --- a/ci/scripts/detect-ubuntu-image-updates.sh +++ b/ci/scripts/detect-ubuntu-image-updates.sh @@ -11,8 +11,8 @@ if [[ $current = $latest ]]; then exit 0; fi -milestone_number=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open | jq -c --arg MILESTONE "$MILESTONE" '.[] | select(.title==$MILESTONE)' | jq -r '.number') -existing_tasks=$( curl -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-builds\&milestone\=${milestone_number} ) +milestone_number=$( curl -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/milestones\?state\=open | jq -c --arg MILESTONE "$MILESTONE" '.[] | select(.title==$MILESTONE)' | jq -r '.number') +existing_tasks=$( curl -u ${GITHUB_USERNAME}:${GITHUB_PASSWORD} -s https://api.github.com/repos/${GITHUB_ORGANIZATION}/${GITHUB_REPO}/issues\?labels\=type:%20task\&state\=open\&creator\=spring-builds\&milestone\=${milestone_number} ) existing_upgrade_issues=$( echo "$existing_tasks" | jq -c --arg TITLE "$ISSUE_TITLE" '.[] | select(.title==$TITLE)' ) if [[ ${existing_upgrade_issues} = "" ]]; then diff --git a/ci/scripts/update-homebrew-tap.sh b/ci/scripts/update-homebrew-tap.sh index 591f5954139..6c703eaf31b 100755 --- a/ci/scripts/update-homebrew-tap.sh +++ b/ci/scripts/update-homebrew-tap.sh @@ -7,7 +7,7 @@ git clone homebrew-tap-repo updated-homebrew-tap-repo > /dev/null if [[ $LATEST_GA = true ]]; then pushd updated-homebrew-tap-repo > /dev/null - curl https://repo.spring.io/libs-release-local/org/springframework/boot/spring-boot-cli/${version}/spring-boot-cli-${version}-homebrew.rb --output spring-boot-cli-${version}-homebrew.rb + curl https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-cli/${version}/spring-boot-cli-${version}-homebrew.rb --output spring-boot-cli-${version}-homebrew.rb rm spring-boot.rb mv spring-boot-cli-*.rb spring-boot.rb git config user.name "Spring Builds" > /dev/null diff --git a/ci/tasks/build-ci-image.yml b/ci/tasks/build-ci-image.yml index dcaa4a06b00..a49bd45f5d7 100644 --- a/ci/tasks/build-ci-image.yml +++ b/ci/tasks/build-ci-image.yml @@ -5,10 +5,8 @@ image_resource: source: repository: concourse/oci-build-task tag: 0.10.0 - registry_mirror: - host: ((docker-hub-mirror)) - username: ((docker-hub-mirror-username)) - password: ((docker-hub-mirror-password)) + username: ((docker-hub-username)) + password: ((docker-hub-password)) inputs: - name: ci-images-git-repo outputs: diff --git a/ci/tasks/build-project-windows.yml b/ci/tasks/build-project-windows.yml index 0dfadb95b71..817ee17482f 100644 --- a/ci/tasks/build-project-windows.yml +++ b/ci/tasks/build-project-windows.yml @@ -8,6 +8,7 @@ params: BRANCH: CI: true GRADLE_ENTERPRISE_ACCESS_KEY: + GRADLE_ENTERPRISE_CACHE_URL: GRADLE_ENTERPRISE_CACHE_USERNAME: GRADLE_ENTERPRISE_CACHE_PASSWORD: GRADLE_ENTERPRISE_URL: https://ge.spring.io diff --git a/ci/tasks/build-project.yml b/ci/tasks/build-project.yml index b3e050d189e..db3003af6e0 100644 --- a/ci/tasks/build-project.yml +++ b/ci/tasks/build-project.yml @@ -12,6 +12,7 @@ params: BRANCH: CI: true GRADLE_ENTERPRISE_ACCESS_KEY: + GRADLE_ENTERPRISE_CACHE_URL: GRADLE_ENTERPRISE_CACHE_USERNAME: GRADLE_ENTERPRISE_CACHE_PASSWORD: GRADLE_ENTERPRISE_URL: https://ge.spring.io @@ -19,8 +20,12 @@ params: run: path: bash args: - - -ec - - | - source /docker-lib.sh - start_docker $DOCKER_HUB_MIRROR - ${PWD}/git-repo/ci/scripts/build-project.sh + - "-ec" + - | + mkdir -p /root/.docker + cat > /root/.docker/config.json < Initialize JDT's package explorer to show working sets as its root objects + + <?xml version="1.0" encoding="UTF-8"?> + <section name="Workbench"> + <section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart"> + <item value="true" key="group_libraries"/> + <item value="false" key="linkWithEditor"/> + <item value="2" key="layout"/> + <item value="2" key="rootMode"/> + <item value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0D;&#x0A;&lt;packageExplorer configured=&quot;true&quot; group_libraries=&quot;1&quot; layout=&quot;2&quot; linkWithEditor=&quot;0&quot; rootMode=&quot;2&quot; sortWorkingSets=&quot;false&quot; workingSetName=&quot;&quot;&gt;&#x0D;&#x0A;&lt;localWorkingSetManager&gt;&#x0D;&#x0A;&lt;workingSet editPageId=&quot;org.eclipse.jdt.internal.ui.OthersWorkingSet&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1382792884467_1&quot; label=&quot;Other Projects&quot; name=&quot;Other Projects&quot;/&gt;&#x0D;&#x0A;&lt;/localWorkingSetManager&gt;&#x0D;&#x0A;&lt;activeWorkingSet workingSetName=&quot;Other Projects&quot;/&gt;&#x0D;&#x0A;&lt;allWorkingSets workingSetName=&quot;Other Projects&quot;/&gt;&#x0D;&#x0A;&lt;/packageExplorer&gt;" key="memento"/> + </section> + </section> + + @@ -78,8 +90,6 @@ name="org.eclipse.wst.server_adapters.feature.feature.group"/> - + url="https://repo.maven.apache.org/maven2/.m2e/connectors/m2eclipse-buildhelper/0.15.0/N/0.15.0.201405280027/"/> + xsi:type="oomph:GradleImportTask" + javaHome="${jre.location-1.8}"> + + + + excludedWorkingSet="//@setupTasks.8/@workingSets[name='spring-boot-smoke-tests'] //@setupTasks.8/@workingSets[name='spring-boot-starters'] //@setupTasks.8/@workingSets[name='spring-boot-tests'] //@setupTasks.8/@workingSets[name='spring-boot-tools']"/> + excludedWorkingSet="//@setupTasks.8/@workingSets[name='spring-boot-smoke-tests']"/> diff --git a/spring-boot-project/spring-boot-cli/src/main/homebrew/spring-boot.rb b/spring-boot-project/spring-boot-cli/src/main/homebrew/spring-boot.rb index e802190723e..b3973befc93 100644 --- a/spring-boot-project/spring-boot-cli/src/main/homebrew/spring-boot.rb +++ b/spring-boot-project/spring-boot-cli/src/main/homebrew/spring-boot.rb @@ -2,7 +2,7 @@ require 'formula' class SpringBoot < Formula homepage 'https://spring.io/projects/spring-boot' - url 'https://repo.spring.io/${repo}/org/springframework/boot/spring-boot-cli/${project.version}/spring-boot-cli-${project.version}-bin.tar.gz' + url '${repo}/org/springframework/boot/spring-boot-cli/${project.version}/spring-boot-cli-${project.version}-bin.tar.gz' version '${project.version}' sha256 '${hash}' head 'https://github.com/spring-projects/spring-boot.git' diff --git a/spring-boot-project/spring-boot-cli/src/main/scoop/springboot.json b/spring-boot-project/spring-boot-cli/src/main/scoop/springboot.json index dbfe2308cc1..d49cacca6de 100644 --- a/spring-boot-project/spring-boot-cli/src/main/scoop/springboot.json +++ b/spring-boot-project/spring-boot-cli/src/main/scoop/springboot.json @@ -3,7 +3,7 @@ "version": "${scoopVersion}", "license": "Apache 2.0", "hash": "${hash}", - "url": "https://repo.spring.io/${repo}/org/springframework/boot/spring-boot-cli/${project.version}/spring-boot-cli-${project.version}-bin.zip", + "url": "${repo}/org/springframework/boot/spring-boot-cli/${project.version}/spring-boot-cli-${project.version}-bin.zip", "extract_dir": "spring-${project.version}", "bin": "bin\\\\spring.bat", "suggest": { diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/MavenResolverGrapeEngineTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/MavenResolverGrapeEngineTests.java index 8d9d7fb4eb1..13c02f51a4e 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/MavenResolverGrapeEngineTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/MavenResolverGrapeEngineTests.java @@ -57,7 +57,7 @@ class MavenResolverGrapeEngineTests { private GrapeEngine createGrapeEngine(RepositoryConfiguration... additionalRepositories) { List repositoryConfigurations = new ArrayList<>(); repositoryConfigurations - .add(new RepositoryConfiguration("central", URI.create("https://repo1.maven.org/maven2"), false)); + .add(new RepositoryConfiguration("central", URI.create("https://repo.maven.apache.org/maven2"), false)); repositoryConfigurations.addAll(Arrays.asList(additionalRepositories)); DependencyResolutionContext dependencyResolutionContext = new DependencyResolutionContext(); dependencyResolutionContext.addDependencyManagement(new SpringBootDependenciesDependencyManagement()); diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/attributes.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/attributes.adoc index 954b2efb593..43a2ecab998 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/attributes.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/attributes.adoc @@ -11,7 +11,7 @@ :docinfo: shared,private :attribute-missing: warn :chomp: default headers packages -:spring-boot-artifactory-repo: snapshot +:artifact-release-type: snapshot :github-tag: main :spring-boot-version: current :github-repo: spring-projects/spring-boot diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/first-application.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/first-application.adoc index e5bf793229b..1091289e21b 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/first-application.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/first-application.adoc @@ -61,8 +61,8 @@ Open your favorite text editor and add the following: -ifeval::["{spring-boot-artifactory-repo}" != "release"] - +ifeval::["{artifact-release-type}" != "release"] + spring-snapshots diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/installing.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/installing.adoc index 0ad32e14b67..4f4f8355517 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/installing.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/installing.adoc @@ -74,13 +74,16 @@ You do not need to use the CLI to work with Spring Boot, but it is a quick way t [[getting-started.installing.cli.manual-installation]] ==== Manual Installation -You can download the Spring CLI distribution from the Spring software repository: +ifeval::["{artifact-release-type}" == "snapshot"] +You can download one of the `spring-boot-cli-\*-bin.zip` or `spring-boot-cli-*-bin.tar.gz` files from the {artifact-download-repo}/org/springframework/boot/spring-boot-cli/{spring-boot-version}/[Spring software repository]. +endif::[] +ifeval::["{artifact-release-type}" != "snapshot"] +You can download the Spring CLI distribution from one of the following locations: -* https://repo.spring.io/{spring-boot-artifactory-repo}/org/springframework/boot/spring-boot-cli/{spring-boot-version}/spring-boot-cli-{spring-boot-version}-bin.zip[spring-boot-cli-{spring-boot-version}-bin.zip] -* https://repo.spring.io/{spring-boot-artifactory-repo}/org/springframework/boot/spring-boot-cli/{spring-boot-version}/spring-boot-cli-{spring-boot-version}-bin.tar.gz[spring-boot-cli-{spring-boot-version}-bin.tar.gz] +* {artifact-download-repo}/org/springframework/boot/spring-boot-cli/{spring-boot-version}/spring-boot-cli-{spring-boot-version}-bin.zip[spring-boot-cli-{spring-boot-version}-bin.zip] +* {artifact-download-repo}/org/springframework/boot/spring-boot-cli/{spring-boot-version}/spring-boot-cli-{spring-boot-version}-bin.tar.gz[spring-boot-cli-{spring-boot-version}-bin.tar.gz] +endif::[] -Cutting edge -https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-cli/[snapshot distributions] are also available. Once downloaded, follow the {github-raw}/spring-boot-project/spring-boot-cli/src/main/content/INSTALL.txt[INSTALL.txt] instructions from the unpacked archive. In summary, there is a `spring` script (`spring.bat` for Windows) in a `bin/` directory in the `.zip` file. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/getting-started.adoc b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/getting-started.adoc index 2c5d3dd5df4..5828e3b8d93 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/getting-started.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/getting-started.adoc @@ -2,7 +2,7 @@ = Getting Started To get started with the plugin it needs to be applied to your project. -ifeval::["{spring-boot-artifactory-repo}" == "release"] +ifeval::["{artifact-release-type}" == "release"] The plugin is https://plugins.gradle.org/plugin/org.springframework.boot[published to Gradle's plugin portal] and can be applied using the `plugins` block: [source,groovy,indent=0,subs="verbatim,attributes",role="primary"] .Groovy @@ -16,7 +16,7 @@ include::../gradle/getting-started/apply-plugin-release.gradle[] include::../gradle/getting-started/apply-plugin-release.gradle.kts[] ---- endif::[] -ifeval::["{spring-boot-artifactory-repo}" == "milestone"] +ifeval::["{artifact-release-type}" == "milestone"] The plugin is published to the Spring milestones repository. Gradle can be configured to use the milestones repository and the plugin can then be applied using the `plugins` block. To configure Gradle to use the milestones repository, add the following to your `settings.gradle` (Groovy) or `settings.gradle.kts` (Kotlin): @@ -47,7 +47,7 @@ include::../gradle/getting-started/apply-plugin-release.gradle[] include::../gradle/getting-started/apply-plugin-release.gradle.kts[] ---- endif::[] -ifeval::["{spring-boot-artifactory-repo}" == "snapshot"] +ifeval::["{artifact-release-type}" == "snapshot"] The plugin is published to the Spring snapshots repository. Gradle can be configured to use the snapshots repository and the plugin can then be applied using the `plugins` block. To configure Gradle to use the snapshots repository, add the following to your `settings.gradle` (Groovy) or `settings.gradle.kts` (Kotlin): diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/managing-dependencies.adoc b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/managing-dependencies.adoc index 68d42db0001..0b6be6238f8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/managing-dependencies.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/managing-dependencies.adoc @@ -58,7 +58,7 @@ The `SpringBootPlugin` class provides a `BOM_COORDINATES` constant that can be u First, configure the project to depend on the Spring Boot plugin but do not apply it: -ifeval::["{spring-boot-artifactory-repo}" == "release"] +ifeval::["{artifact-release-type}" == "release"] [source,groovy,indent=0,subs="verbatim,attributes",role="primary"] .Groovy ---- @@ -71,7 +71,7 @@ include::../gradle/managing-dependencies/depend-on-plugin-release.gradle[] include::../gradle/managing-dependencies/depend-on-plugin-release.gradle.kts[] ---- endif::[] -ifeval::["{spring-boot-artifactory-repo}" == "milestone"] +ifeval::["{artifact-release-type}" == "milestone"] [source,groovy,indent=0,subs="verbatim,attributes",role="primary"] .Groovy ---- @@ -83,7 +83,7 @@ include::../gradle/managing-dependencies/depend-on-plugin-milestone.gradle[] include::../gradle/managing-dependencies/depend-on-plugin-release.gradle.kts[] ---- endif::[] -ifeval::["{spring-boot-artifactory-repo}" == "snapshot"] +ifeval::["{artifact-release-type}" == "snapshot"] [source,groovy,indent=0,subs="verbatim,attributes",role="primary"] .Groovy ----