You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by zh...@apache.org on 2026/09/16 08:04:24 UTC
(seatunnel) 02/02: [Fix][Release] Prevent release deploy from splitting Nexus staging repositories
This is an automated email from the ASF dual-hosted git repository.
hawk9821 pushed a commit to branch 3.0.0-release
in repository https://gitbox.apache.org/repos/asf/seatunnel.git
commit 49fdaf58b1fb2853723738b7988a1aefc3c3f289
Author: zhangdonghao <ha...@qq.com>
AuthorDate: Wed Sep 16 15:53:33 2026 +0800
[Fix][Release] Prevent release deploy from splitting Nexus staging repositories
---
pom.xml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 61 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index edc72eb1fa..11d95ea8e0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -117,7 +117,10 @@
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
- <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
+ <!-- retryFailedDeploymentCount only exists in maven-deploy-plugin 3.0.0+. The effective version
+ already comes from the org.apache:apache parent (3.1.1) and is pinned explicitly in the
+ apache-release profile; keep this in sync with the parent. -->
+ <maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<maven-pmd-plugin.version>3.8</maven-pmd-plugin.version>
<elasticsearch6.client.version>6.3.1</elasticsearch6.client.version>
@@ -1010,7 +1013,14 @@
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>@{project.version}</tagNameFormat>
- <tagBase>${project.version}</tagBase>
+ <!--
+ Defaults for the forked build that release:perform starts. A release deploy must
+ never be retried automatically: while Nexus creates the staging repository
+ implicitly, every extra deploy attempt can open an additional staging repository
+ and silently split one release over several repositories. A command line
+ -Darguments=... replaces this value as a whole, so keep both in sync.
+ -->
+ <arguments>-DskipTests -Dskip.spotless=true -DretryFailedDeploymentCount=1 -Daether.connector.basic.parallelPut=false -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false</arguments>
</configuration>
<dependencies>
<dependency>
@@ -1181,6 +1191,55 @@
</issueManagement>
<profiles>
+ <!--
+ Release only. Deploying to
+ https://repository.apache.org/service/local/staging/deploy/maven2 with the plain
+ maven-deploy-plugin lets Nexus create the staging repository implicitly: the client never
+ learns its ID, cannot target it again, and a failed upload that gets retried (or a change
+ of the client IP) makes Nexus open a second staging repository. Repositories that are
+ already open cannot be merged afterwards, so such a split can only be fixed by dropping
+ everything and uploading the whole release again.
+
+ Declaring nexus-staging-maven-plugin with extensions=true on the profile that
+ release:perform already activates (maven-release-plugin:releaseProfiles=apache-release,
+ inherited from the org.apache:apache parent) makes the deploy explicit instead:
+ exactly one staging repository belongs to one build, it can be pinned for every re-run
+ with -DstagingRepositoryId=<id>, and the repository is closed (but never released)
+ when the build ends.
+ -->
+ <profile>
+ <id>apache-release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>${nexus-staging-maven-plugin.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <serverId>apache.releases.https</serverId>
+ <nexusUrl>https://repository.apache.org/</nexusUrl>
+ <!-- Never publish on its own: close, verify the repository, then release. -->
+ <autoReleaseAfterClose>false</autoReleaseAfterClose>
+ <!-- Keep the staging repository if the close rules reject it, so the
+ uploaded content stays available for inspection and repair. -->
+ <keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
+ <!-- Keep a partially uploaded repository on an IO failure as well: never
+ let the client drop staged content behind the release manager's back. -->
+ <keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
+ <stagingDescription>${project.groupId}:${project.artifactId}:${project.version}</stagingDescription>
+ </configuration>
+ </plugin>
+ <!-- The plugin above only takes over the deploy phase when both it and
+ maven-deploy-plugin are declared, so this declaration is required. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>${maven-deploy-plugin.version}</version>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
<profile>
<id>release</id>
<activation>