Skip to content

Commit be8652d

Browse files
committed
refactor: replace nexus-staging-maven-plugin with central-publishing-maven-plugin
1 parent 77833b1 commit be8652d

1 file changed

Lines changed: 19 additions & 31 deletions

File tree

‎pom.xml‎

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>hermes-java-sdk</artifactId>
66
<name>${project.groupId}:${project.artifactId}</name>
77
<url>https://github.com/easy-4-java/${project.artifactId}</url>
8-
<description>Hermes Agent Java SDK (HTTP API Server + SSE + local CLI) — JDK 17 line</description>
8+
<description>Hermes Agent Java SDK (HTTP API Server + SSE + local CLI) — JDK 8 line</description>
99
<version>2.0.x.20260730-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

@@ -62,7 +62,10 @@
6262
<artifactId>maven-compiler-plugin</artifactId>
6363
<version>${maven-compiler-plugin.version}</version>
6464
<configuration>
65-
<release>${java.version}</release>
65+
<!-- 源代码编译版本 -->
66+
<source>${java.version}</source>
67+
<!-- 目标平台编译版本 -->
68+
<target>${java.version}</target>
6669
<!-- 字符集编码 -->
6770
<encoding>${project.build.sourceEncoding}</encoding>
6871
<!-- 编译最大内存 -->
@@ -248,19 +251,16 @@
248251
</executions>
249252
</plugin>
250253

251-
<!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
254+
<!-- https://mvnrepository.com/artifact/org.sonatype.central/central-publishing-maven-plugin -->
252255
<plugin>
253-
<groupId>org.sonatype.plugins</groupId>
254-
<artifactId>nexus-staging-maven-plugin</artifactId>
255-
<version>${maven-nexus-staging-plugin.version}</version>
256+
<groupId>org.sonatype.central</groupId>
257+
<artifactId>central-publishing-maven-plugin</artifactId>
258+
<version>${maven-central-publishing-plugin.version}</version>
256259
<extensions>true</extensions>
257260
<configuration>
258-
<serverId>ossrh</serverId>
259-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
260-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
261-
<stagingProgressPauseDurationSeconds>60</stagingProgressPauseDurationSeconds>
262-
<stagingProgressTimeoutMinutes>20</stagingProgressTimeoutMinutes>
263-
<detectBuildFailures>true</detectBuildFailures>
261+
<publishingServerId>central</publishingServerId>
262+
<autoPublish>true</autoPublish>
263+
<waitUntil>published</waitUntil>
264264
</configuration>
265265
</plugin>
266266
</plugins>
@@ -319,9 +319,7 @@
319319
<artifactId>maven-compiler-plugin</artifactId>
320320
<version>${maven-compiler-plugin.version}</version>
321321
<configuration>
322-
<!-- 源代码编译版本 -->
323322
<source>${java.version}</source>
324-
<!-- 目标平台编译版本 -->
325323
<target>${java.version}</target>
326324
<!-- 保留方法参数名,支持 Spring MVC 按参数名绑定 -->
327325
<parameters>true</parameters>
@@ -353,8 +351,7 @@
353351
<junit.version>4.13.2</junit.version>
354352
<slf4j.version>2.0.18</slf4j.version>
355353
<lombok.version>1.18.46</lombok.version>
356-
<jackson.version>2.18.9</jackson.version>
357-
<junit-jupiter.version>6.1.0</junit-jupiter.version>
354+
<junit-jupiter.version>5.11.4</junit-jupiter.version>
358355
<commons-lang.version>2.6</commons-lang.version>
359356
</properties>
360357
</profile>
@@ -442,10 +439,10 @@
442439
<artifactId>maven-release-plugin</artifactId>
443440
</plugin>
444441

445-
<!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
442+
<!-- https://mvnrepository.com/artifact/org.sonatype.central/central-publishing-maven-plugin -->
446443
<plugin>
447-
<groupId>org.sonatype.plugins</groupId>
448-
<artifactId>nexus-staging-maven-plugin</artifactId>
444+
<groupId>org.sonatype.central</groupId>
445+
<artifactId>central-publishing-maven-plugin</artifactId>
449446
</plugin>
450447
</plugins>
451448
</build>
@@ -504,7 +501,7 @@
504501
<junit.version>5.11.4</junit.version>
505502
<lombok.version>1.18.46</lombok.version>
506503
<okhttp3.version>4.12.0</okhttp3.version>
507-
<okhttp3-extension.version>2.0.x.20260630-SNAPSHOT</okhttp3-extension.version>
504+
<okhttp3-extension.version>1.0.x.20260630-SNAPSHOT</okhttp3-extension.version>
508505
<slf4j.version>2.0.18</slf4j.version>
509506
<!-- Maven Plugin versions -->
510507
<maven-central-publishing-plugin.version>0.11.0</maven-central-publishing-plugin.version>
@@ -519,11 +516,12 @@
519516
<maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
520517
<maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
521518
<maven-nexus-staging-plugin.version>1.7.0</maven-nexus-staging-plugin.version>
519+
<!-- Deprecated: nexus-staging-maven-plugin 已被 central-publishing-maven-plugin 取代 -->
522520
<maven-release-plugin.version>3.3.1</maven-release-plugin.version>
523521
<maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
524522
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
525523
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
526-
<junit-jupiter.version>6.1.0</junit-jupiter.version>
524+
<junit-jupiter.version>5.11.4</junit-jupiter.version>
527525
</properties>
528526

529527
<!-- 依赖版本统一管理(dependencyManagement) -->
@@ -552,16 +550,6 @@
552550
<version>${okhttp3.version}</version>
553551
</dependency>
554552
<!-- For Jackson -->
555-
<dependency>
556-
<groupId>com.fasterxml.jackson.core</groupId>
557-
<artifactId>jackson-annotations</artifactId>
558-
<version>${jackson.version}</version>
559-
</dependency>
560-
<dependency>
561-
<groupId>com.fasterxml.jackson.core</groupId>
562-
<artifactId>jackson-core</artifactId>
563-
<version>${jackson.version}</version>
564-
</dependency>
565553
<dependency>
566554
<groupId>com.fasterxml.jackson.core</groupId>
567555
<artifactId>jackson-databind</artifactId>

0 commit comments

Comments
 (0)