|
8 | 8 | <description>OpenCode Java SDK - JDK 1.8 line</description> |
9 | 9 | <version>1.0.x.20260630-SNAPSHOT</version> |
10 | 10 | <packaging>jar</packaging> |
| 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>https://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 | <java.version>1.8</java.version> |
47 | 57 | <maven.compiler.source>${java.version}</maven.compiler.source> |
48 | 58 | <maven.compiler.target>${java.version}</maven.compiler.target> |
|
68 | 78 | <maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version> |
69 | 79 | <maven-source-plugin.version>3.4.0</maven-source-plugin.version> |
70 | 80 | <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> |
72 | 82 | </properties> |
| 83 | + |
| 84 | + <!-- 依赖版本统一管理(dependencyManagement) --> |
73 | 85 | <dependencyManagement> |
| 86 | + |
| 87 | + <!-- 项目依赖(dependencies) --> |
74 | 88 | <dependencies> |
75 | 89 | <dependency> |
76 | 90 | <groupId>com.fasterxml.jackson</groupId> |
|
125 | 139 | </dependency> |
126 | 140 | </dependencies> |
127 | 141 | </dependencyManagement> |
| 142 | + |
| 143 | + <!-- 项目依赖(dependencies) --> |
128 | 144 | <dependencies> |
129 | 145 | <dependency> |
130 | 146 | <groupId>com.squareup.okhttp3</groupId> |
|
162 | 178 | <scope>test</scope> |
163 | 179 | </dependency> |
164 | 180 | </dependencies> |
| 181 | + |
| 182 | + <!-- 构建配置(Build) --> |
165 | 183 | <build> |
| 184 | + |
| 185 | + <!-- 插件版本统一管理(pluginManagement) --> |
166 | 186 | <pluginManagement> |
167 | 187 | <plugins> |
168 | 188 | <plugin> |
169 | 189 | <groupId>org.apache.maven.plugins</groupId> |
170 | 190 | <artifactId>maven-clean-plugin</artifactId> |
171 | 191 | <version>${maven-clean-plugin.version}</version> |
172 | 192 | </plugin> |
| 193 | + |
| 194 | + <!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 --> |
173 | 195 | <plugin> |
174 | 196 | <groupId>org.apache.maven.plugins</groupId> |
175 | 197 | <artifactId>maven-compiler-plugin</artifactId> |
|
223 | 245 | </execution> |
224 | 246 | </executions> |
225 | 247 | </plugin> |
| 248 | + |
| 249 | + <!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) --> |
226 | 250 | <plugin> |
227 | 251 | <groupId>org.apache.maven.plugins</groupId> |
228 | 252 | <artifactId>maven-gpg-plugin</artifactId> |
|
262 | 286 | <goals>deploy</goals> |
263 | 287 | </configuration> |
264 | 288 | </plugin> |
| 289 | + |
| 290 | + <!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) --> |
265 | 291 | <plugin> |
266 | 292 | <groupId>org.apache.maven.plugins</groupId> |
267 | 293 | <artifactId>maven-source-plugin</artifactId> |
|
311 | 337 | </archive> |
312 | 338 | </configuration> |
313 | 339 | </plugin> |
| 340 | + |
| 341 | + <!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) --> |
314 | 342 | <plugin> |
315 | 343 | <groupId>org.apache.maven.plugins</groupId> |
316 | 344 | <artifactId>maven-javadoc-plugin</artifactId> |
|
331 | 359 | </execution> |
332 | 360 | </executions> |
333 | 361 | </plugin> |
| 362 | + |
| 363 | + <!-- Central Publishing 插件:发布制品到 Maven Central Portal --> |
334 | 364 | <plugin> |
335 | 365 | <groupId>org.sonatype.central</groupId> |
336 | 366 | <artifactId>central-publishing-maven-plugin</artifactId> |
|
345 | 375 | </plugins> |
346 | 376 | </pluginManagement> |
347 | 377 | <plugins> |
| 378 | + |
| 379 | + <!-- JaCoCo 覆盖率插件:生成覆盖率报告并校验测试覆盖率(目标 90%) --> |
348 | 380 | <plugin> |
349 | 381 | <groupId>org.jacoco</groupId> |
350 | 382 | <artifactId>jacoco-maven-plugin</artifactId> |
351 | | - <version>${jacoco-maven-plugin.version}</version> |
| 383 | + <version>${maven-jacoco-plugin.version}</version> |
352 | 384 | <executions> |
353 | 385 | <execution> |
354 | 386 | <id>prepare-agent</id> |
|
387 | 419 | </execution> |
388 | 420 | </executions> |
389 | 421 | </plugin> |
| 422 | + |
| 423 | + <!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 --> |
390 | 424 | <plugin> |
391 | 425 | <groupId>org.apache.maven.plugins</groupId> |
392 | 426 | <artifactId>maven-compiler-plugin</artifactId> |
|
408 | 442 | </plugin> |
409 | 443 | </plugins> |
410 | 444 | </build> |
| 445 | + |
| 446 | + <!-- 构建 Profile 配置 --> |
411 | 447 | <profiles> |
412 | 448 | <profile> |
413 | 449 | <id>disable-javadoc-doclint</id> |
414 | 450 | <activation> |
415 | 451 | <jdk>[1.8,)</jdk> |
416 | 452 | </activation> |
| 453 | + |
| 454 | + <!-- 版本属性定义:Java 版本、依赖版本与 Maven 插件版本统一管理 --> |
417 | 455 | <properties> |
418 | 456 | <additionalparam>-Xdoclint:none -Xlint:unchecked</additionalparam> |
419 | 457 | </properties> |
420 | 458 | </profile> |
421 | 459 | <profile> |
422 | 460 | <id>release</id> |
| 461 | + |
| 462 | + <!-- 构建配置(Build) --> |
423 | 463 | <build> |
424 | 464 | <plugins> |
425 | 465 | <plugin> |
426 | 466 | <groupId>org.apache.maven.plugins</groupId> |
427 | 467 | <artifactId>maven-enforcer-plugin</artifactId> |
428 | 468 | </plugin> |
| 469 | + |
| 470 | + <!-- Maven 编译插件:统一 Java 版本参数与 Lombok 注解处理 --> |
429 | 471 | <plugin> |
430 | 472 | <groupId>org.apache.maven.plugins</groupId> |
431 | 473 | <artifactId>maven-compiler-plugin</artifactId> |
|
442 | 484 | <groupId>org.apache.maven.plugins</groupId> |
443 | 485 | <artifactId>maven-jar-plugin</artifactId> |
444 | 486 | </plugin> |
| 487 | + |
| 488 | + <!-- Maven 源码插件:打包 sources.jar(Maven Central 发布要求) --> |
445 | 489 | <plugin> |
446 | 490 | <groupId>org.apache.maven.plugins</groupId> |
447 | 491 | <artifactId>maven-source-plugin</artifactId> |
448 | 492 | </plugin> |
| 493 | + |
| 494 | + <!-- Maven Javadoc 插件:打包 javadoc.jar(Maven Central 发布要求) --> |
449 | 495 | <plugin> |
450 | 496 | <groupId>org.apache.maven.plugins</groupId> |
451 | 497 | <artifactId>maven-javadoc-plugin</artifactId> |
|
454 | 500 | <groupId>org.apache.maven.plugins</groupId> |
455 | 501 | <artifactId>maven-install-plugin</artifactId> |
456 | 502 | </plugin> |
| 503 | + |
| 504 | + <!-- GPG 签名插件:对制品进行 PGP 签名(Maven Central 发布要求) --> |
457 | 505 | <plugin> |
458 | 506 | <groupId>org.apache.maven.plugins</groupId> |
459 | 507 | <artifactId>maven-gpg-plugin</artifactId> |
|
466 | 514 | <groupId>org.apache.maven.plugins</groupId> |
467 | 515 | <artifactId>maven-release-plugin</artifactId> |
468 | 516 | </plugin> |
| 517 | + |
| 518 | + <!-- Central Publishing 插件:发布制品到 Maven Central Portal --> |
469 | 519 | <plugin> |
470 | 520 | <groupId>org.sonatype.central</groupId> |
471 | 521 | <artifactId>central-publishing-maven-plugin</artifactId> |
|
0 commit comments