From 9278a66e1e7b259768d6291494f87fde23d637a9 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 07:31:23 +0000 Subject: [PATCH] Fix: Correct Sonatype snapshot URL - Updates the Sonatype snapshot repository URL to the correct endpoint: `https://central.sonatype.com/repository/maven-snapshots/`. - The previous URL was incorrect and caused a 404 error during deployment. - This change applies to all Gradle configuration files, GitHub Actions workflows, and documentation. --- .github/workflows/publish-snapshot.yml | 2 +- .../com/tencent/devops/conventions/RepositoryConvention.kt | 2 +- .../devops-publish-gradle-plugin/README.md | 2 +- devops-boot-sample/settings.gradle.kts | 2 +- docs/contribute.md | 6 +++--- docs/dependency/repository.md | 2 +- docs/plugin/devops-boot-gradle-plugin.md | 2 +- docs/plugin/devops-publish-gradle-plugin.md | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index b2ee453..9f280c1 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -29,7 +29,7 @@ jobs: env: ORG_GRADLE_PROJECT_repoUsername: ${{ secrets.SONATYPE_USERNAME }} ORG_GRADLE_PROJECT_repoPassword: ${{ secrets.SONATYPE_PASSWORD }} - ORG_GRADLE_PROJECT_snapshotRepoUrl: "https://central.sonatype.com/content/repositories/snapshots/" + ORG_GRADLE_PROJECT_snapshotRepoUrl: "https://central.sonatype.com/repository/maven-snapshots/" ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }} ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} diff --git a/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/conventions/RepositoryConvention.kt b/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/conventions/RepositoryConvention.kt index 3d08b3c..b820652 100644 --- a/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/conventions/RepositoryConvention.kt +++ b/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/conventions/RepositoryConvention.kt @@ -39,7 +39,7 @@ class RepositoryConvention { // snapshot maven { it.name = "MavenSnapshot" - it.url = URI("https://central.sonatype.com/content/repositories/snapshots/") + it.url = URI("https://central.sonatype.com/repository/maven-snapshots/") it.mavenContent { descriptor -> descriptor.snapshotsOnly() } diff --git a/devops-boot-project/devops-boot-tools/devops-publish-gradle-plugin/README.md b/devops-boot-project/devops-boot-tools/devops-publish-gradle-plugin/README.md index d6b14c9..32f2cb6 100644 --- a/devops-boot-project/devops-boot-tools/devops-publish-gradle-plugin/README.md +++ b/devops-boot-project/devops-boot-tools/devops-publish-gradle-plugin/README.md @@ -66,7 +66,7 @@ key=value | 属性 | 类型 | 默认值 | 说明 | | --------------- | ------- | ------ | ---------- | | releaseRepoUrl | string | [https://central.sonatype.com/service/local/](https://central.sonatype.com/service/local/) | release仓库地址,默然为SONATYPE中央仓库地址 | -| snapshotRepoUrl | string | [https://central.sonatype.com/content/repositories/snapshots/](https://central.sonatype.com/content/repositories/snapshots/) | snapshot仓库地址,默然为SONATYPE中央仓库地址 | +| snapshotRepoUrl | string | [https://central.sonatype.com/repository/maven-snapshots/](https://central.sonatype.com/repository/maven-snapshots/) | snapshot仓库地址,默然为SONATYPE中央仓库地址 | | repoUsername | string | null | 仓库认证用户名 | | repoPassword | string | null | 仓库认证密码 | diff --git a/devops-boot-sample/settings.gradle.kts b/devops-boot-sample/settings.gradle.kts index b904f21..0a9c8fb 100644 --- a/devops-boot-sample/settings.gradle.kts +++ b/devops-boot-sample/settings.gradle.kts @@ -14,7 +14,7 @@ pluginManagement { mavenCentral() gradlePluginPortal() maven { - setUrl("https://central.sonatype.com/content/repositories/snapshots/") + setUrl("https://central.sonatype.com/repository/maven-snapshots/") } } } diff --git a/docs/contribute.md b/docs/contribute.md index e3b6769..c6ea4c9 100644 --- a/docs/contribute.md +++ b/docs/contribute.md @@ -30,7 +30,7 @@ devops-framework/ ./gradlew publishToMavenLocal ``` -- 发布jar包到central.sonatype.com中央仓库,同时会发布插件jar包 +- 发布jar包到Sonatype中央仓库,同时会发布插件jar包 ```shell script ./gradlew publish ``` @@ -43,8 +43,8 @@ devops-framework/ ### 环境变量准备 当需要发布到中央仓库时,会读取以下环境变量: -- `ORG_GRADLE_PROJECT_repoUsername` central.sonatype.com用户名 -- `ORG_GRADLE_PROJECT_repoPassword` central.sonatype.com密码 +- `ORG_GRADLE_PROJECT_repoUsername` Sonatype用户名 +- `ORG_GRADLE_PROJECT_repoPassword` Sonatype密码 - `ORG_GRADLE_PROJECT_signingKey` gpg签名key - `ORG_GRADLE_PROJECT_signingKeyId` gpg签名key id - `ORG_GRADLE_PROJECT_signingPassword` gpg签名密码 diff --git a/docs/dependency/repository.md b/docs/dependency/repository.md index f6c920a..607abaf 100644 --- a/docs/dependency/repository.md +++ b/docs/dependency/repository.md @@ -24,5 +24,5 @@ https://mirrors.tencent.com/nexus/repository/gradle-plugins/ ``` #### 三. snapshot库 ``` -https://central.sonatype.com/content/repositories/snapshots/ +https://central.sonatype.com/repository/maven-snapshots/ ``` diff --git a/docs/plugin/devops-boot-gradle-plugin.md b/docs/plugin/devops-boot-gradle-plugin.md index 8397acc..f0bc07c 100644 --- a/docs/plugin/devops-boot-gradle-plugin.md +++ b/docs/plugin/devops-boot-gradle-plugin.md @@ -56,7 +56,7 @@ plugins { 1. [Tencent Mirrors](https://mirrors.tencent.com/nexus/repository/maven-public/) 2. mavenCentral 3. jcenter -4. [MavenSnapshotRepo](https://central.sonatype.com/content/repositories/snapshots/) +4. [MavenSnapshotRepo](https://central.sonatype.com/repository/maven-snapshots/) ### 2. 配置依赖管理 - 添加`dependency-management`插件 diff --git a/docs/plugin/devops-publish-gradle-plugin.md b/docs/plugin/devops-publish-gradle-plugin.md index 90f8036..4af71f2 100644 --- a/docs/plugin/devops-publish-gradle-plugin.md +++ b/docs/plugin/devops-publish-gradle-plugin.md @@ -67,7 +67,7 @@ key=value | 属性 | 类型 | 默认值 | 说明 | | --------------- | ------- | ------ | ---------- | | releaseRepoUrl | string | [https://central.sonatype.com/service/local/](https://central.sonatype.com/service/local/) | release仓库地址,默然为SONATYPE中央仓库地址 | -| snapshotRepoUrl | string | [https://central.sonatype.com/content/repositories/snapshots/](https://central.sonatype.com/content/repositories/snapshots/) | snapshot仓库地址,默然为SONATYPE中央仓库地址 | +| snapshotRepoUrl | string | [https://central.sonatype.com/repository/maven-snapshots/](https://central.sonatype.com/repository/maven-snapshots/) | snapshot仓库地址,默然为SONATYPE中央仓库地址 | | repoUsername | string | null | 仓库认证用户名 | | repoPassword | string | null | 仓库认证密码 |