Skip to content

Commit 57c6ccc

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

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
<description>OpenCode Java SDK - JDK 21 line</description>
99
<version>3.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,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
<java.version>21</java.version>
4757
<maven.compiler.release>${java.version}</maven.compiler.release>
4858
<maven.compiler.source>${java.version}</maven.compiler.source>
@@ -69,9 +79,13 @@
6979
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
7080
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
7181
<maven-central-publishing-plugin.version>0.11.0</maven-central-publishing-plugin.version>
72-
<jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
82+
<maven-jacoco-plugin.version>0.8.15</maven-jacoco-plugin.version>
7383
</properties>
84+
85+
<!-- 依赖版本统一管理(dependencyManagement) -->
7486
<dependencyManagement>
87+
88+
<!-- 项目依赖(dependencies) -->
7589
<dependencies>
7690
<dependency>
7791
<groupId>com.fasterxml.jackson</groupId>
@@ -126,6 +140,8 @@
126140
</dependency>
127141
</dependencies>
128142
</dependencyManagement>
143+
144+
<!-- 项目依赖(dependencies) -->
129145
<dependencies>
130146
<dependency>
131147
<groupId>com.squareup.okhttp3</groupId>
@@ -163,14 +179,20 @@
163179
<scope>test</scope>
164180
</dependency>
165181
</dependencies>
182+
183+
<!-- 构建配置(Build) -->
166184
<build>
185+
186+
<!-- 插件版本统一管理(pluginManagement) -->
167187
<pluginManagement>
168188
<plugins>
169189
<plugin>
170190
<groupId>org.apache.maven.plugins</groupId>
171191
<artifactId>maven-clean-plugin</artifactId>
172192
<version>${maven-clean-plugin.version}</version>
173193
</plugin>
194+
195+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
174196
<plugin>
175197
<groupId>org.apache.maven.plugins</groupId>
176198
<artifactId>maven-compiler-plugin</artifactId>
@@ -225,6 +247,8 @@
225247
</execution>
226248
</executions>
227249
</plugin>
250+
251+
<!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) -->
228252
<plugin>
229253
<groupId>org.apache.maven.plugins</groupId>
230254
<artifactId>maven-gpg-plugin</artifactId>
@@ -264,6 +288,8 @@
264288
<goals>deploy</goals>
265289
</configuration>
266290
</plugin>
291+
292+
<!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) -->
267293
<plugin>
268294
<groupId>org.apache.maven.plugins</groupId>
269295
<artifactId>maven-source-plugin</artifactId>
@@ -313,6 +339,8 @@
313339
</archive>
314340
</configuration>
315341
</plugin>
342+
343+
<!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) -->
316344
<plugin>
317345
<groupId>org.apache.maven.plugins</groupId>
318346
<artifactId>maven-javadoc-plugin</artifactId>
@@ -333,6 +361,8 @@
333361
</execution>
334362
</executions>
335363
</plugin>
364+
365+
<!-- Central Publishing 插件:发布制品到 Maven Central Portal -->
336366
<plugin>
337367
<groupId>org.sonatype.central</groupId>
338368
<artifactId>central-publishing-maven-plugin</artifactId>
@@ -347,10 +377,12 @@
347377
</plugins>
348378
</pluginManagement>
349379
<plugins>
380+
381+
<!-- JaCoCo 覆盖率插件:生成覆盖率报告并校验测试覆盖率(目标 90%) -->
350382
<plugin>
351383
<groupId>org.jacoco</groupId>
352384
<artifactId>jacoco-maven-plugin</artifactId>
353-
<version>${jacoco-maven-plugin.version}</version>
385+
<version>${maven-jacoco-plugin.version}</version>
354386
<executions>
355387
<execution>
356388
<id>prepare-agent</id>
@@ -389,6 +421,8 @@
389421
</execution>
390422
</executions>
391423
</plugin>
424+
425+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
392426
<plugin>
393427
<groupId>org.apache.maven.plugins</groupId>
394428
<artifactId>maven-compiler-plugin</artifactId>
@@ -410,24 +444,32 @@
410444
</plugin>
411445
</plugins>
412446
</build>
447+
448+
<!-- 构建 Profile 配置 -->
413449
<profiles>
414450
<profile>
415451
<id>disable-javadoc-doclint</id>
416452
<activation>
417453
<jdk>[1.8,)</jdk>
418454
</activation>
455+
456+
<!-- 版本属性定义:Java 版本、依赖版本与 Maven 插件版本统一管理 -->
419457
<properties>
420458
<additionalparam>-Xdoclint:none -Xlint:unchecked</additionalparam>
421459
</properties>
422460
</profile>
423461
<profile>
424462
<id>release</id>
463+
464+
<!-- 构建配置(Build) -->
425465
<build>
426466
<plugins>
427467
<plugin>
428468
<groupId>org.apache.maven.plugins</groupId>
429469
<artifactId>maven-enforcer-plugin</artifactId>
430470
</plugin>
471+
472+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
431473
<plugin>
432474
<groupId>org.apache.maven.plugins</groupId>
433475
<artifactId>maven-compiler-plugin</artifactId>
@@ -444,10 +486,14 @@
444486
<groupId>org.apache.maven.plugins</groupId>
445487
<artifactId>maven-jar-plugin</artifactId>
446488
</plugin>
489+
490+
<!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) -->
447491
<plugin>
448492
<groupId>org.apache.maven.plugins</groupId>
449493
<artifactId>maven-source-plugin</artifactId>
450494
</plugin>
495+
496+
<!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) -->
451497
<plugin>
452498
<groupId>org.apache.maven.plugins</groupId>
453499
<artifactId>maven-javadoc-plugin</artifactId>
@@ -456,6 +502,8 @@
456502
<groupId>org.apache.maven.plugins</groupId>
457503
<artifactId>maven-install-plugin</artifactId>
458504
</plugin>
505+
506+
<!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) -->
459507
<plugin>
460508
<groupId>org.apache.maven.plugins</groupId>
461509
<artifactId>maven-gpg-plugin</artifactId>
@@ -468,6 +516,8 @@
468516
<groupId>org.apache.maven.plugins</groupId>
469517
<artifactId>maven-release-plugin</artifactId>
470518
</plugin>
519+
520+
<!-- Central Publishing 插件:发布制品到 Maven Central Portal -->
471521
<plugin>
472522
<groupId>org.sonatype.central</groupId>
473523
<artifactId>central-publishing-maven-plugin</artifactId>

0 commit comments

Comments
 (0)