Skip to content

Commit 775f210

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

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 1.8 line</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,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>1.8</java.version>
4757
<maven.compiler.source>${java.version}</maven.compiler.source>
4858
<maven.compiler.target>${java.version}</maven.compiler.target>
@@ -68,9 +78,13 @@
6878
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
6979
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
7080
<maven-central-publishing-plugin.version>0.11.0</maven-central-publishing-plugin.version>
71-
<jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
81+
<maven-jacoco-plugin.version>0.8.15</maven-jacoco-plugin.version>
7282
</properties>
83+
84+
<!-- 依赖版本统一管理(dependencyManagement) -->
7385
<dependencyManagement>
86+
87+
<!-- 项目依赖(dependencies) -->
7488
<dependencies>
7589
<dependency>
7690
<groupId>com.fasterxml.jackson</groupId>
@@ -125,6 +139,8 @@
125139
</dependency>
126140
</dependencies>
127141
</dependencyManagement>
142+
143+
<!-- 项目依赖(dependencies) -->
128144
<dependencies>
129145
<dependency>
130146
<groupId>com.squareup.okhttp3</groupId>
@@ -162,14 +178,20 @@
162178
<scope>test</scope>
163179
</dependency>
164180
</dependencies>
181+
182+
<!-- 构建配置(Build) -->
165183
<build>
184+
185+
<!-- 插件版本统一管理(pluginManagement) -->
166186
<pluginManagement>
167187
<plugins>
168188
<plugin>
169189
<groupId>org.apache.maven.plugins</groupId>
170190
<artifactId>maven-clean-plugin</artifactId>
171191
<version>${maven-clean-plugin.version}</version>
172192
</plugin>
193+
194+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
173195
<plugin>
174196
<groupId>org.apache.maven.plugins</groupId>
175197
<artifactId>maven-compiler-plugin</artifactId>
@@ -223,6 +245,8 @@
223245
</execution>
224246
</executions>
225247
</plugin>
248+
249+
<!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) -->
226250
<plugin>
227251
<groupId>org.apache.maven.plugins</groupId>
228252
<artifactId>maven-gpg-plugin</artifactId>
@@ -262,6 +286,8 @@
262286
<goals>deploy</goals>
263287
</configuration>
264288
</plugin>
289+
290+
<!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) -->
265291
<plugin>
266292
<groupId>org.apache.maven.plugins</groupId>
267293
<artifactId>maven-source-plugin</artifactId>
@@ -311,6 +337,8 @@
311337
</archive>
312338
</configuration>
313339
</plugin>
340+
341+
<!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) -->
314342
<plugin>
315343
<groupId>org.apache.maven.plugins</groupId>
316344
<artifactId>maven-javadoc-plugin</artifactId>
@@ -331,6 +359,8 @@
331359
</execution>
332360
</executions>
333361
</plugin>
362+
363+
<!-- Central Publishing 插件:发布制品到 Maven Central Portal -->
334364
<plugin>
335365
<groupId>org.sonatype.central</groupId>
336366
<artifactId>central-publishing-maven-plugin</artifactId>
@@ -345,10 +375,12 @@
345375
</plugins>
346376
</pluginManagement>
347377
<plugins>
378+
379+
<!-- JaCoCo 覆盖率插件:生成覆盖率报告并校验测试覆盖率(目标 90%) -->
348380
<plugin>
349381
<groupId>org.jacoco</groupId>
350382
<artifactId>jacoco-maven-plugin</artifactId>
351-
<version>${jacoco-maven-plugin.version}</version>
383+
<version>${maven-jacoco-plugin.version}</version>
352384
<executions>
353385
<execution>
354386
<id>prepare-agent</id>
@@ -387,6 +419,8 @@
387419
</execution>
388420
</executions>
389421
</plugin>
422+
423+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
390424
<plugin>
391425
<groupId>org.apache.maven.plugins</groupId>
392426
<artifactId>maven-compiler-plugin</artifactId>
@@ -408,24 +442,32 @@
408442
</plugin>
409443
</plugins>
410444
</build>
445+
446+
<!-- 构建 Profile 配置 -->
411447
<profiles>
412448
<profile>
413449
<id>disable-javadoc-doclint</id>
414450
<activation>
415451
<jdk>[1.8,)</jdk>
416452
</activation>
453+
454+
<!-- 版本属性定义:Java 版本、依赖版本与 Maven 插件版本统一管理 -->
417455
<properties>
418456
<additionalparam>-Xdoclint:none -Xlint:unchecked</additionalparam>
419457
</properties>
420458
</profile>
421459
<profile>
422460
<id>release</id>
461+
462+
<!-- 构建配置(Build) -->
423463
<build>
424464
<plugins>
425465
<plugin>
426466
<groupId>org.apache.maven.plugins</groupId>
427467
<artifactId>maven-enforcer-plugin</artifactId>
428468
</plugin>
469+
470+
<!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 -->
429471
<plugin>
430472
<groupId>org.apache.maven.plugins</groupId>
431473
<artifactId>maven-compiler-plugin</artifactId>
@@ -442,10 +484,14 @@
442484
<groupId>org.apache.maven.plugins</groupId>
443485
<artifactId>maven-jar-plugin</artifactId>
444486
</plugin>
487+
488+
<!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) -->
445489
<plugin>
446490
<groupId>org.apache.maven.plugins</groupId>
447491
<artifactId>maven-source-plugin</artifactId>
448492
</plugin>
493+
494+
<!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) -->
449495
<plugin>
450496
<groupId>org.apache.maven.plugins</groupId>
451497
<artifactId>maven-javadoc-plugin</artifactId>
@@ -454,6 +500,8 @@
454500
<groupId>org.apache.maven.plugins</groupId>
455501
<artifactId>maven-install-plugin</artifactId>
456502
</plugin>
503+
504+
<!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) -->
457505
<plugin>
458506
<groupId>org.apache.maven.plugins</groupId>
459507
<artifactId>maven-gpg-plugin</artifactId>
@@ -466,6 +514,8 @@
466514
<groupId>org.apache.maven.plugins</groupId>
467515
<artifactId>maven-release-plugin</artifactId>
468516
</plugin>
517+
518+
<!-- Central Publishing 插件:发布制品到 Maven Central Portal -->
469519
<plugin>
470520
<groupId>org.sonatype.central</groupId>
471521
<artifactId>central-publishing-maven-plugin</artifactId>

0 commit comments

Comments
 (0)