From 857be92e445f8f3da071134d3bb4e06f583961c8 Mon Sep 17 00:00:00 2001 From: "ark-hand[bot]" <315378070+ark-hand[bot]@users.noreply.github.com> Date: Wed, 19 Aug 2026 10:37:20 +0000 Subject: [PATCH] feat(pom): add Maven Central publishing profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 目的 让 ark-runtime Java SDK 可以发布到 Maven Central(`com.volcengine:ark-runtime`),与 Python 侧的 PyPI 自动发布链路对齐。 ## 改动(pom.xml) 1. **`` + ``**:Maven Central 上传的硬性校验项(老 SDK volcengine-java-sdk 同款写法) 2. **`public` profile**(仅发布时激活,日常构建不受影响): - `distributionManagement` → `ossrh-staging-api.central.sonatype.com`(OSSRH 兼容端点) - `maven-javadoc-plugin`:attach-javadocs(Central 要求 javadoc jar;sources jar 已有) - `maven-gpg-plugin` 3.2.7:工件签名(loopback) - `central-publishing-maven-plugin` 0.8.0:`publishingServerId=central`、`tokenAuth`、`autoPublish` 配置逐项对照 volcengine/volcengine-java-sdk 已验证的发布设置(2.0.22 在用)。 ## 配套(不在本 MR) - ark-apis 侧新增 `sdk-templates/java/.github/workflows/release.yml`(tag 触发,setup-java 注入 Central token + GPG key,`mvn deploy -Ppublic`)——与 Python 的 release.yml 同构 - GitHub 仓库 secrets:`OSSRH_USERNAME` / `OSSRH_TOKEN`(Maven 账号管理 wiki 的共享 Sonatype 账号,ark 团队已登记)、`GPG_PRIVATE_KEY` / `GPG_PASSPHRASE`(ark 专用签名密钥,公钥已传 keyserver) ## 合入后 下一个 sync 版本(含 release.yml 的那次)tag 触发后自动发布到 Central,`repo.maven.apache.org` 可查。 See merge request: !80 Sync-Source-Commit: 27987d07d5f6fd250f8deca59b5cdd376f8ea105 Ark-APIs-Commit: 59c90de5ac837a87443bd463e4500f6ef6eceda6 Hand-Written-Reason: Manual pom change (Maven Central publishing profile + scm metadata normalization). No ark-apis regeneration involved; attributed to the same ark-apis snapshot as parent f35d4f9. Release-Version: 0.2.0 --- pom.xml | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/pom.xml b/pom.xml index 7d2faf0..2269c28 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,19 @@ + + https://github.com/volcengine/ark-runtime-java + scm:git:https://github.com/volcengine/ark-runtime-java.git + scm:git:https://github.com/volcengine/ark-runtime-java.git + + + + volcengine + ark-runtime + volcengine@bytedance.com + + + UTF-8 8 @@ -156,4 +169,73 @@ + + + + + public + + + sonatype-nexus-staging + https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots + + + sonatype-nexus-staging + https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/ + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + org.sonatype.central + central-publishing-maven-plugin + 0.8.0 + true + + central + true + true + + + + + +