Skip to content

Commit ae8e365

Browse files
committed
style(pom): 按 ddd4j 风格补充中文注释与排版(块间空行),统一覆盖率/发布插件属性名为 maven-jacoco-plugin.version 与 maven-central-publishing-plugin.version
1 parent fde3c2c commit ae8e365

1 file changed

Lines changed: 56 additions & 4 deletions

File tree

pom.xml

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,24 @@
88
<description>Codex CLI Java SDK — subprocess integration for OpenAI Codex agent</description>
99
<version>1.0.x.20260630-SNAPSHOT</version>
1010
<packaging>jar</packaging>
11+
12+
<!-- 开源协议采用 Apache 2.0 协议 -->
1113
<licenses>
1214
<license>
1315
<name>The Apache Software License, Version 2.0</name>
1416
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
1517
</license>
1618
</licenses>
19+
20+
<!-- 源码仓库(SCM)信息 -->
1721
<scm>
1822
<connection>scm:git:https://github.com/easy-4-java/${project.artifactId}.git</connection>
1923
<developerConnection>scm:git:https://github.com/easy-4-java/${project.artifactId}.git</developerConnection>
2024
<url>https://github.com/easy-4-java/${project.artifactId}</url>
2125
<tag>${project.artifactId}</tag>
2226
</scm>
27+
28+
<!-- 开发者信息 -->
2329
<developers>
2430
<developer>
2531
<name>Loong Wan</name>
@@ -31,6 +37,8 @@
3137
<timezone>+8</timezone>
3238
</developer>
3339
</developers>
40+
41+
<!-- 制品发布仓库配置(distributionManagement) -->
3442
<distributionManagement>
3543
<repository>
3644
<id>2624322-release-6F6h6R</id>
@@ -41,9 +49,15 @@
4149
<url>https://packages.aliyun.com/6927b116e6c3e0425dbdf60d/maven/2624322-snapshot-3eoov3</url>
4250
</snapshotRepository>
4351
</distributionManagement>
52+
53+
<!-- 构建配置(Build) -->
4454
<build>
55+
56+
<!-- 插件版本统一管理(pluginManagement) -->
4557
<pluginManagement>
4658
<plugins>
59+
60+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
4761
<plugin>
4862
<groupId>org.apache.maven.plugins</groupId>
4963
<artifactId>maven-compiler-plugin</artifactId>
@@ -90,6 +104,8 @@
90104
</execution>
91105
</executions>
92106
</plugin>
107+
108+
<!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) -->
93109
<plugin>
94110
<groupId>org.apache.maven.plugins</groupId>
95111
<artifactId>maven-gpg-plugin</artifactId>
@@ -129,6 +145,8 @@
129145
<goals>deploy</goals>
130146
</configuration>
131147
</plugin>
148+
149+
<!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) -->
132150
<plugin>
133151
<groupId>org.apache.maven.plugins</groupId>
134152
<artifactId>maven-source-plugin</artifactId>
@@ -175,6 +193,8 @@
175193
</archive>
176194
</configuration>
177195
</plugin>
196+
197+
<!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) -->
178198
<plugin>
179199
<groupId>org.apache.maven.plugins</groupId>
180200
<artifactId>maven-javadoc-plugin</artifactId>
@@ -211,10 +231,12 @@
211231
</plugins>
212232
</pluginManagement>
213233
<plugins>
234+
235+
<!-- JaCoCo 覆盖率插件:生成覆盖率报告并校验测试覆盖率(目标 90%) -->
214236
<plugin>
215237
<groupId>org.jacoco</groupId>
216238
<artifactId>jacoco-maven-plugin</artifactId>
217-
<version>${jacoco-maven-plugin.version}</version>
239+
<version>${maven-jacoco-plugin.version}</version>
218240
<executions>
219241
<execution>
220242
<id>prepare-agent</id>
@@ -253,6 +275,8 @@
253275
</execution>
254276
</executions>
255277
</plugin>
278+
279+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
256280
<plugin>
257281
<groupId>org.apache.maven.plugins</groupId>
258282
<artifactId>maven-compiler-plugin</artifactId>
@@ -274,26 +298,34 @@
274298
</plugin>
275299
</plugins>
276300
</build>
301+
302+
<!-- 构建 Profile 配置 -->
277303
<profiles>
278304
<profile>
279305
<id>disable-javadoc-doclint</id>
280306
<activation>
281307
<jdk>[1.8,)</jdk>
282308
</activation>
309+
310+
<!-- 版本属性定义:Java 版本、依赖版本与 Maven 插件版本统一管理 -->
283311
<properties>
284-
<central-publishing-maven-plugin.version>0.11.0</central-publishing-maven-plugin.version>
312+
<maven-central-publishing-plugin.version>0.11.0</maven-central-publishing-plugin.version>
285313
<additionalparam>-Xdoclint:none</additionalparam>
286-
<jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
314+
<maven-jacoco-plugin.version>0.8.15</maven-jacoco-plugin.version>
287315
</properties>
288316
</profile>
289317
<profile>
290318
<id>release</id>
319+
320+
<!-- 构建配置(Build) -->
291321
<build>
292322
<plugins>
293323
<plugin>
294324
<groupId>org.apache.maven.plugins</groupId>
295325
<artifactId>maven-enforcer-plugin</artifactId>
296326
</plugin>
327+
328+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
297329
<plugin>
298330
<groupId>org.apache.maven.plugins</groupId>
299331
<artifactId>maven-compiler-plugin</artifactId>
@@ -310,10 +342,14 @@
310342
<groupId>org.apache.maven.plugins</groupId>
311343
<artifactId>maven-jar-plugin</artifactId>
312344
</plugin>
345+
346+
<!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) -->
313347
<plugin>
314348
<groupId>org.apache.maven.plugins</groupId>
315349
<artifactId>maven-source-plugin</artifactId>
316350
</plugin>
351+
352+
<!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) -->
317353
<plugin>
318354
<groupId>org.apache.maven.plugins</groupId>
319355
<artifactId>maven-javadoc-plugin</artifactId>
@@ -322,6 +358,8 @@
322358
<groupId>org.apache.maven.plugins</groupId>
323359
<artifactId>maven-install-plugin</artifactId>
324360
</plugin>
361+
362+
<!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) -->
325363
<plugin>
326364
<groupId>org.apache.maven.plugins</groupId>
327365
<artifactId>maven-gpg-plugin</artifactId>
@@ -343,8 +381,12 @@
343381
</profile>
344382
<profile>
345383
<id>central</id>
384+
385+
<!-- 构建配置(Build) -->
346386
<build>
347387
<plugins>
388+
389+
<!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) -->
348390
<plugin>
349391
<groupId>org.apache.maven.plugins</groupId>
350392
<artifactId>maven-gpg-plugin</artifactId>
@@ -359,10 +401,12 @@
359401
</execution>
360402
</executions>
361403
</plugin>
404+
405+
<!-- Central Publishing 插件:发布制品到 Maven Central Portal -->
362406
<plugin>
363407
<groupId>org.sonatype.central</groupId>
364408
<artifactId>central-publishing-maven-plugin</artifactId>
365-
<version>${central-publishing-maven-plugin.version}</version>
409+
<version>${maven-central-publishing-plugin.version}</version>
366410
<extensions>true</extensions>
367411
<configuration>
368412
<publishingServerId>central</publishingServerId>
@@ -374,6 +418,8 @@
374418
</build>
375419
</profile>
376420
</profiles>
421+
422+
<!-- 版本属性定义:Java 版本、依赖版本与 Maven 插件版本统一管理 -->
377423
<properties>
378424
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
379425
<java.version>1.8</java.version>
@@ -398,7 +444,11 @@
398444
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
399445
<maven-nexus-staging-plugin.version>1.7.0</maven-nexus-staging-plugin.version>
400446
</properties>
447+
448+
<!-- 依赖版本统一管理(dependencyManagement) -->
401449
<dependencyManagement>
450+
451+
<!-- 项目依赖(dependencies) -->
402452
<dependencies>
403453
<dependency>
404454
<groupId>com.fasterxml.jackson.core</groupId>
@@ -429,6 +479,8 @@
429479
</dependency>
430480
</dependencies>
431481
</dependencyManagement>
482+
483+
<!-- 项目依赖(dependencies) -->
432484
<dependencies>
433485
<dependency>
434486
<groupId>com.fasterxml.jackson.core</groupId>

0 commit comments

Comments
 (0)