From 717d26c1aa0b60fd7bdee50f8c636d08de5ae65d Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:49:15 -0700 Subject: [PATCH] Stop Deploying JavaDoc Outside of Antora Closes gh-2245 --- .../continuous-integration-workflow.yml | 9 +-- build.gradle | 2 +- .../gradle/docs/SpringDeployDocsPlugin.groovy | 78 ------------------- .../gradle/convention/SpringDocsPlugin.java | 2 - ...ingframework.gradle.deploy-docs.properties | 2 - 5 files changed, 2 insertions(+), 91 deletions(-) delete mode 100644 buildSrc/src/main/groovy/org/springframework/gradle/docs/SpringDeployDocsPlugin.groovy delete mode 100644 buildSrc/src/main/resources/META-INF/gradle-plugins/org.springframework.gradle.deploy-docs.properties diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 34c10239..d907fe88 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -40,16 +40,9 @@ jobs: with: should-deploy-artifacts: ${{ needs.build.outputs.should-deploy-artifacts }} secrets: inherit - deploy-docs: - name: Deploy Docs - needs: [build, test] - uses: spring-io/spring-security-release-tools/.github/workflows/deploy-docs.yml@v1 - with: - should-deploy-docs: ${{ needs.build.outputs.should-deploy-artifacts }} - secrets: inherit perform-release: name: Perform Release - needs: [deploy-artifacts, deploy-docs] + needs: [deploy-artifacts] uses: spring-io/spring-security-release-tools/.github/workflows/perform-release.yml@v1 with: should-perform-release: ${{ needs.deploy-artifacts.outputs.artifacts-deployed }} diff --git a/build.gradle b/build.gradle index f87c3a0f..b67abca1 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ springRelease { weekOfMonth = 3 dayOfWeek = 2 referenceDocUrl = "https://docs.spring.io/spring-authorization-server/reference/{version}/index.html" - apiDocUrl = "https://docs.spring.io/spring-authorization-server/docs/{version}/api/" + apiDocUrl = "https://docs.spring.io/spring-authorization-server/reference/{version}/api/java/index.html" replaceSnapshotVersionInReferenceDocUrl = true } diff --git a/buildSrc/src/main/groovy/org/springframework/gradle/docs/SpringDeployDocsPlugin.groovy b/buildSrc/src/main/groovy/org/springframework/gradle/docs/SpringDeployDocsPlugin.groovy deleted file mode 100644 index 8ad17d97..00000000 --- a/buildSrc/src/main/groovy/org/springframework/gradle/docs/SpringDeployDocsPlugin.groovy +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2002-2022 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.gradle.docs - -import org.gradle.api.Plugin -import org.gradle.api.Project - -class SpringDeployDocsPlugin implements Plugin { - - @Override - void apply(Project project) { - project.getPluginManager().apply('org.hidetake.ssh') - - project.ssh.settings { - knownHosts = allowAnyHosts - } - project.remotes { - docs { - role 'docs' - if (project.hasProperty('deployDocsHost')) { - host = project.findProperty('deployDocsHost') - } - retryCount = 5 // retry 5 times (default is 0) - retryWaitSec = 10 // wait 10 seconds between retries (default is 0) - user = project.findProperty('deployDocsSshUsername') - if (project.hasProperty('deployDocsSshKeyPath')) { - identity = project.file(project.findProperty('deployDocsSshKeyPath')) - } else if (project.hasProperty('deployDocsSshKey')) { - identity = project.findProperty('deployDocsSshKey') - } - if (project.hasProperty('deployDocsSshPassphrase')) { - passphrase = project.findProperty('deployDocsSshPassphrase') - } - } - } - - project.task('deployDocs') { - dependsOn 'docsZip' - doFirst { - project.ssh.run { - session(project.remotes.docs) { - def now = System.currentTimeMillis() - def name = project.rootProject.name - def version = project.rootProject.version - def tempPath = "/tmp/${name}-${now}-docs/".replaceAll(' ', '_') - execute "mkdir -p $tempPath" - - project.tasks.docsZip.outputs.each { o -> - put from: o.files, into: tempPath - } - - execute "unzip $tempPath*.zip -d $tempPath" - - def extractPath = "/var/www/domains/spring.io/docs/htdocs/autorepo/docs/${name}/${version}/" - - execute "rm -rf $extractPath" - execute "mkdir -p $extractPath" - execute "mv $tempPath/docs/* $extractPath" - execute "chmod -R g+w $extractPath" - } - } - } - } - } -} \ No newline at end of file diff --git a/buildSrc/src/main/java/io/spring/gradle/convention/SpringDocsPlugin.java b/buildSrc/src/main/java/io/spring/gradle/convention/SpringDocsPlugin.java index e567d608..1426bca5 100644 --- a/buildSrc/src/main/java/io/spring/gradle/convention/SpringDocsPlugin.java +++ b/buildSrc/src/main/java/io/spring/gradle/convention/SpringDocsPlugin.java @@ -50,8 +50,6 @@ public class SpringDocsPlugin implements Plugin { pluginManager.apply(SpringManagementConfigurationPlugin.class); pluginManager.apply(SpringRepositoryPlugin.class); pluginManager.apply(SpringAsciidoctorPlugin.class); - // Note: Applying plugin via id since it requires groovy compilation - pluginManager.apply("org.springframework.gradle.deploy-docs"); pluginManager.apply(SpringJavadocApiPlugin.class); pluginManager.apply(SpringJavadocOptionsPlugin.class); diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/org.springframework.gradle.deploy-docs.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/org.springframework.gradle.deploy-docs.properties deleted file mode 100644 index e135a0a7..00000000 --- a/buildSrc/src/main/resources/META-INF/gradle-plugins/org.springframework.gradle.deploy-docs.properties +++ /dev/null @@ -1,2 +0,0 @@ -# Referencing this plugin by ID allows java code to depend on groovy compilation -implementation-class=org.springframework.gradle.docs.SpringDeployDocsPlugin \ No newline at end of file