|
8 | 8 | <version>3.0.x.20260630-SNAPSHOT</version> |
9 | 9 | <packaging>jar</packaging> |
10 | 10 | <description>OpenCLI multi-adapter CLI integration SDK — 3.0.x line (JDK 21; for Boot 4.x starters)</description> |
| 11 | + |
| 12 | + <!-- 开源协议采用 Apache 2.0 协议 --> |
11 | 13 | <licenses> |
12 | 14 | <license> |
13 | 15 | <name>The Apache Software License, Version 2.0</name> |
14 | 16 | <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> |
15 | 17 | </license> |
16 | 18 | </licenses> |
| 19 | + |
| 20 | + <!-- 源码仓库(SCM)信息 --> |
17 | 21 | <scm> |
18 | 22 | <connection>scm:git:https://github.com/easy-4-java/${project.artifactId}.git</connection> |
19 | 23 | <developerConnection>scm:git:https://github.com/easy-4-java/${project.artifactId}.git</developerConnection> |
20 | 24 | <url>https://github.com/easy-4-java/${project.artifactId}</url> |
21 | 25 | <tag>${project.artifactId}</tag> |
22 | 26 | </scm> |
| 27 | + |
| 28 | + <!-- 开发者信息 --> |
23 | 29 | <developers> |
24 | 30 | <developer> |
25 | 31 | <name>Loong Wan</name> |
|
31 | 37 | <timezone>+8</timezone> |
32 | 38 | </developer> |
33 | 39 | </developers> |
| 40 | + |
| 41 | + <!-- 制品发布仓库配置(distributionManagement) --> |
34 | 42 | <distributionManagement> |
35 | 43 | <repository> |
36 | 44 | <id>2624322-release-6F6h6R</id> |
|
41 | 49 | <url>https://packages.aliyun.com/6927b116e6c3e0425dbdf60d/maven/2624322-snapshot-3eoov3</url> |
42 | 50 | </snapshotRepository> |
43 | 51 | </distributionManagement> |
| 52 | + |
| 53 | + <!-- 版本属性定义:Java 版本、依赖版本与 Maven 插件版本统一管理 --> |
44 | 54 | <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> |
46 | 56 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
47 | 57 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
48 | 58 | <java.version>21</java.version> |
|
71 | 81 | <maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version> |
72 | 82 | <maven-source-plugin.version>3.4.0</maven-source-plugin.version> |
73 | 83 | <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> |
75 | 85 | </properties> |
| 86 | + |
| 87 | + <!-- 依赖版本统一管理(dependencyManagement) --> |
76 | 88 | <dependencyManagement> |
| 89 | + |
| 90 | + <!-- 项目依赖(dependencies) --> |
77 | 91 | <dependencies> |
78 | 92 | <dependency> |
79 | 93 | <groupId>com.fasterxml.jackson</groupId> |
|
123 | 137 | </dependency> |
124 | 138 | </dependencies> |
125 | 139 | </dependencyManagement> |
| 140 | + |
| 141 | + <!-- 项目依赖(dependencies) --> |
126 | 142 | <dependencies> |
127 | 143 | <dependency> |
128 | 144 | <groupId>com.fasterxml.jackson.core</groupId> |
|
155 | 171 | <scope>test</scope> |
156 | 172 | </dependency> |
157 | 173 | </dependencies> |
| 174 | + |
| 175 | + <!-- 构建配置(Build) --> |
158 | 176 | <build> |
| 177 | + |
| 178 | + <!-- 插件版本统一管理(pluginManagement) --> |
159 | 179 | <pluginManagement> |
160 | 180 | <plugins> |
161 | 181 | <plugin> |
162 | 182 | <groupId>org.apache.maven.plugins</groupId> |
163 | 183 | <artifactId>maven-clean-plugin</artifactId> |
164 | 184 | <version>${maven-clean-plugin.version}</version> |
165 | 185 | </plugin> |
| 186 | + |
| 187 | + <!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 --> |
166 | 188 | <plugin> |
167 | 189 | <groupId>org.apache.maven.plugins</groupId> |
168 | 190 | <artifactId>maven-compiler-plugin</artifactId> |
|
212 | 234 | </execution> |
213 | 235 | </executions> |
214 | 236 | </plugin> |
| 237 | + |
| 238 | + <!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) --> |
215 | 239 | <plugin> |
216 | 240 | <groupId>org.apache.maven.plugins</groupId> |
217 | 241 | <artifactId>maven-gpg-plugin</artifactId> |
|
251 | 275 | <goals>deploy</goals> |
252 | 276 | </configuration> |
253 | 277 | </plugin> |
| 278 | + |
| 279 | + <!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) --> |
254 | 280 | <plugin> |
255 | 281 | <groupId>org.apache.maven.plugins</groupId> |
256 | 282 | <artifactId>maven-source-plugin</artifactId> |
|
300 | 326 | </archive> |
301 | 327 | </configuration> |
302 | 328 | </plugin> |
| 329 | + |
| 330 | + <!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) --> |
303 | 331 | <plugin> |
304 | 332 | <groupId>org.apache.maven.plugins</groupId> |
305 | 333 | <artifactId>maven-javadoc-plugin</artifactId> |
|
320 | 348 | </execution> |
321 | 349 | </executions> |
322 | 350 | </plugin> |
| 351 | + |
| 352 | + <!-- Central Publishing 插件:发布制品到 Maven Central Portal --> |
323 | 353 | <plugin> |
324 | 354 | <groupId>org.sonatype.central</groupId> |
325 | 355 | <artifactId>central-publishing-maven-plugin</artifactId> |
|
334 | 364 | </plugins> |
335 | 365 | </pluginManagement> |
336 | 366 | <plugins> |
| 367 | + |
| 368 | + <!-- JaCoCo 覆盖率插件:生成覆盖率报告并校验测试覆盖率(目标 90%) --> |
337 | 369 | <plugin> |
338 | 370 | <groupId>org.jacoco</groupId> |
339 | 371 | <artifactId>jacoco-maven-plugin</artifactId> |
340 | | - <version>${jacoco-maven-plugin.version}</version> |
| 372 | + <version>${maven-jacoco-plugin.version}</version> |
341 | 373 | <executions> |
342 | 374 | <execution> |
343 | 375 | <id>prepare-agent</id> |
|
376 | 408 | </execution> |
377 | 409 | </executions> |
378 | 410 | </plugin> |
| 411 | + |
| 412 | + <!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 --> |
379 | 413 | <plugin> |
380 | 414 | <groupId>org.apache.maven.plugins</groupId> |
381 | 415 | <artifactId>maven-compiler-plugin</artifactId> |
|
397 | 431 | </plugin> |
398 | 432 | </plugins> |
399 | 433 | </build> |
| 434 | + |
| 435 | + <!-- 构建 Profile 配置 --> |
400 | 436 | <profiles> |
401 | 437 | <profile> |
402 | 438 | <id>disable-javadoc-doclint</id> |
403 | 439 | <activation> |
404 | 440 | <jdk>[1.8,)</jdk> |
405 | 441 | </activation> |
| 442 | + |
| 443 | + <!-- 版本属性定义:Java 版本、依赖版本与 Maven 插件版本统一管理 --> |
406 | 444 | <properties> |
407 | 445 | <additionalparam>-Xdoclint:none -Xlint:unchecked</additionalparam> |
408 | 446 | </properties> |
409 | 447 | </profile> |
410 | 448 | <profile> |
411 | 449 | <id>release</id> |
| 450 | + |
| 451 | + <!-- 构建配置(Build) --> |
412 | 452 | <build> |
413 | 453 | <plugins> |
414 | 454 | <plugin> |
415 | 455 | <groupId>org.apache.maven.plugins</groupId> |
416 | 456 | <artifactId>maven-enforcer-plugin</artifactId> |
417 | 457 | </plugin> |
| 458 | + |
| 459 | + <!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 --> |
418 | 460 | <plugin> |
419 | 461 | <groupId>org.apache.maven.plugins</groupId> |
420 | 462 | <artifactId>maven-compiler-plugin</artifactId> |
|
431 | 473 | <groupId>org.apache.maven.plugins</groupId> |
432 | 474 | <artifactId>maven-jar-plugin</artifactId> |
433 | 475 | </plugin> |
| 476 | + |
| 477 | + <!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) --> |
434 | 478 | <plugin> |
435 | 479 | <groupId>org.apache.maven.plugins</groupId> |
436 | 480 | <artifactId>maven-source-plugin</artifactId> |
437 | 481 | </plugin> |
| 482 | + |
| 483 | + <!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) --> |
438 | 484 | <plugin> |
439 | 485 | <groupId>org.apache.maven.plugins</groupId> |
440 | 486 | <artifactId>maven-javadoc-plugin</artifactId> |
|
443 | 489 | <groupId>org.apache.maven.plugins</groupId> |
444 | 490 | <artifactId>maven-install-plugin</artifactId> |
445 | 491 | </plugin> |
| 492 | + |
| 493 | + <!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) --> |
446 | 494 | <plugin> |
447 | 495 | <groupId>org.apache.maven.plugins</groupId> |
448 | 496 | <artifactId>maven-gpg-plugin</artifactId> |
|
455 | 503 | <groupId>org.apache.maven.plugins</groupId> |
456 | 504 | <artifactId>maven-release-plugin</artifactId> |
457 | 505 | </plugin> |
| 506 | + |
| 507 | + <!-- Central Publishing 插件:发布制品到 Maven Central Portal --> |
458 | 508 | <plugin> |
459 | 509 | <groupId>org.sonatype.central</groupId> |
460 | 510 | <artifactId>central-publishing-maven-plugin</artifactId> |
|
0 commit comments