Skip to content

Commit e62bbe6

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

1 file changed

Lines changed: 53 additions & 3 deletions

File tree

‎pom.xml‎

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,24 @@
88
<version>3.0.x.20260630-SNAPSHOT</version>
99
<packaging>jar</packaging>
1010
<description>OpenCLI multi-adapter CLI integration SDK — 3.0.x line (JDK 21; for Boot 4.x starters)</description>
11+
12+
<!-- 开源协议采用 Apache 2.0 协议 -->
1113
<licenses>
1214
<license>
1315
<name>The Apache Software License, Version 2.0</name>
1416
<url>http://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,8 +49,10 @@
4149
<url>https://packages.aliyun.com/6927b116e6c3e0425dbdf60d/maven/2624322-snapshot-3eoov3</url>
4250
</snapshotRepository>
4351
</distributionManagement>
52+
53+
<!-- 版本属性定义:Java 版本、依赖版本与 Maven 插件版本统一管理 -->
4454
<properties>
45-
<central-publishing-maven-plugin.version>0.11.0</central-publishing-maven-plugin.version>
55+
<maven-central-publishing-plugin.version>0.11.0</maven-central-publishing-plugin.version>
4656
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4757
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
4858
<java.version>21</java.version>
@@ -71,9 +81,13 @@
7181
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
7282
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
7383
<maven-central-publishing-plugin.version>0.11.0</maven-central-publishing-plugin.version>
74-
<jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
84+
<maven-jacoco-plugin.version>0.8.15</maven-jacoco-plugin.version>
7585
</properties>
86+
87+
<!-- 依赖版本统一管理(dependencyManagement) -->
7688
<dependencyManagement>
89+
90+
<!-- 项目依赖(dependencies) -->
7791
<dependencies>
7892
<dependency>
7993
<groupId>com.fasterxml.jackson</groupId>
@@ -123,6 +137,8 @@
123137
</dependency>
124138
</dependencies>
125139
</dependencyManagement>
140+
141+
<!-- 项目依赖(dependencies) -->
126142
<dependencies>
127143
<dependency>
128144
<groupId>com.fasterxml.jackson.core</groupId>
@@ -155,14 +171,20 @@
155171
<scope>test</scope>
156172
</dependency>
157173
</dependencies>
174+
175+
<!-- 构建配置(Build) -->
158176
<build>
177+
178+
<!-- 插件版本统一管理(pluginManagement) -->
159179
<pluginManagement>
160180
<plugins>
161181
<plugin>
162182
<groupId>org.apache.maven.plugins</groupId>
163183
<artifactId>maven-clean-plugin</artifactId>
164184
<version>${maven-clean-plugin.version}</version>
165185
</plugin>
186+
187+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
166188
<plugin>
167189
<groupId>org.apache.maven.plugins</groupId>
168190
<artifactId>maven-compiler-plugin</artifactId>
@@ -212,6 +234,8 @@
212234
</execution>
213235
</executions>
214236
</plugin>
237+
238+
<!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) -->
215239
<plugin>
216240
<groupId>org.apache.maven.plugins</groupId>
217241
<artifactId>maven-gpg-plugin</artifactId>
@@ -251,6 +275,8 @@
251275
<goals>deploy</goals>
252276
</configuration>
253277
</plugin>
278+
279+
<!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) -->
254280
<plugin>
255281
<groupId>org.apache.maven.plugins</groupId>
256282
<artifactId>maven-source-plugin</artifactId>
@@ -300,6 +326,8 @@
300326
</archive>
301327
</configuration>
302328
</plugin>
329+
330+
<!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) -->
303331
<plugin>
304332
<groupId>org.apache.maven.plugins</groupId>
305333
<artifactId>maven-javadoc-plugin</artifactId>
@@ -320,6 +348,8 @@
320348
</execution>
321349
</executions>
322350
</plugin>
351+
352+
<!-- Central Publishing 插件:发布制品到 Maven Central Portal -->
323353
<plugin>
324354
<groupId>org.sonatype.central</groupId>
325355
<artifactId>central-publishing-maven-plugin</artifactId>
@@ -334,10 +364,12 @@
334364
</plugins>
335365
</pluginManagement>
336366
<plugins>
367+
368+
<!-- JaCoCo 覆盖率插件:生成覆盖率报告并校验测试覆盖率(目标 90%) -->
337369
<plugin>
338370
<groupId>org.jacoco</groupId>
339371
<artifactId>jacoco-maven-plugin</artifactId>
340-
<version>${jacoco-maven-plugin.version}</version>
372+
<version>${maven-jacoco-plugin.version}</version>
341373
<executions>
342374
<execution>
343375
<id>prepare-agent</id>
@@ -376,6 +408,8 @@
376408
</execution>
377409
</executions>
378410
</plugin>
411+
412+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
379413
<plugin>
380414
<groupId>org.apache.maven.plugins</groupId>
381415
<artifactId>maven-compiler-plugin</artifactId>
@@ -397,24 +431,32 @@
397431
</plugin>
398432
</plugins>
399433
</build>
434+
435+
<!-- 构建 Profile 配置 -->
400436
<profiles>
401437
<profile>
402438
<id>disable-javadoc-doclint</id>
403439
<activation>
404440
<jdk>[1.8,)</jdk>
405441
</activation>
442+
443+
<!-- 版本属性定义:Java 版本、依赖版本与 Maven 插件版本统一管理 -->
406444
<properties>
407445
<additionalparam>-Xdoclint:none -Xlint:unchecked</additionalparam>
408446
</properties>
409447
</profile>
410448
<profile>
411449
<id>release</id>
450+
451+
<!-- 构建配置(Build) -->
412452
<build>
413453
<plugins>
414454
<plugin>
415455
<groupId>org.apache.maven.plugins</groupId>
416456
<artifactId>maven-enforcer-plugin</artifactId>
417457
</plugin>
458+
459+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
418460
<plugin>
419461
<groupId>org.apache.maven.plugins</groupId>
420462
<artifactId>maven-compiler-plugin</artifactId>
@@ -431,10 +473,14 @@
431473
<groupId>org.apache.maven.plugins</groupId>
432474
<artifactId>maven-jar-plugin</artifactId>
433475
</plugin>
476+
477+
<!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) -->
434478
<plugin>
435479
<groupId>org.apache.maven.plugins</groupId>
436480
<artifactId>maven-source-plugin</artifactId>
437481
</plugin>
482+
483+
<!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) -->
438484
<plugin>
439485
<groupId>org.apache.maven.plugins</groupId>
440486
<artifactId>maven-javadoc-plugin</artifactId>
@@ -443,6 +489,8 @@
443489
<groupId>org.apache.maven.plugins</groupId>
444490
<artifactId>maven-install-plugin</artifactId>
445491
</plugin>
492+
493+
<!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) -->
446494
<plugin>
447495
<groupId>org.apache.maven.plugins</groupId>
448496
<artifactId>maven-gpg-plugin</artifactId>
@@ -455,6 +503,8 @@
455503
<groupId>org.apache.maven.plugins</groupId>
456504
<artifactId>maven-release-plugin</artifactId>
457505
</plugin>
506+
507+
<!-- Central Publishing 插件:发布制品到 Maven Central Portal -->
458508
<plugin>
459509
<groupId>org.sonatype.central</groupId>
460510
<artifactId>central-publishing-maven-plugin</artifactId>

0 commit comments

Comments
 (0)