Skip to content

Commit e14cc7c

Browse files
committed
fix(pom): normalize element order, properties structure, comments per java-component-patterns
1 parent 4675ae1 commit e14cc7c

1 file changed

Lines changed: 54 additions & 18 deletions

File tree

‎pom.xml‎

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 http://maven.apache.org/xsd/maven-4.1.0.xsd">
3-
<modelVersion>4.1.0</modelVersion>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
44
<groupId>io.github.easy4j</groupId>
55
<artifactId>opencli-java-sdk</artifactId>
66
<name>${project.groupId}:${project.artifactId}</name>
77
<url>https://github.com/easy-4-java/${project.artifactId}</url>
8-
<version>3.0.x.20260630-SNAPSHOT</version>
8+
<version>1.0.x.20260630-SNAPSHOT</version>
99
<packaging>jar</packaging>
10-
<description>OpenCLI multi-adapter CLI integration SDK — 3.0.x line (JDK 21; for Boot 4.x starters)</description>
10+
<description>OpenCLI multi-adapter CLI integration SDK — 1.0.x line (JDK 8; for Boot 2.x starters)</description>
11+
1112
<!-- 开源协议采用 Apache 2.0 协议 -->
1213
<licenses>
1314
<license>
1415
<name>The Apache Software License, Version 2.0</name>
15-
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
16+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
1617
</license>
1718
</licenses>
19+
1820
<!-- 源码仓库(SCM)信息 -->
1921
<scm>
2022
<connection>scm:git:https://github.com/easy-4-java/${project.artifactId}.git</connection>
2123
<developerConnection>scm:git:https://github.com/easy-4-java/${project.artifactId}.git</developerConnection>
2224
<url>https://github.com/easy-4-java/${project.artifactId}</url>
2325
<tag>${project.artifactId}</tag>
2426
</scm>
27+
2528
<!-- 开发者信息 -->
2629
<developers>
2730
<developer>
@@ -34,18 +37,21 @@
3437
<timezone>+8</timezone>
3538
</developer>
3639
</developers>
40+
3741
<properties>
3842
<!-- ═══ 第一段: 基础属性(自然排序)═══ -->
39-
<java.version>21</java.version>
43+
<java.version>1.8</java.version>
4044
<maven.compiler.release>${java.version}</maven.compiler.release>
41-
<maven.version>4.0.0-rc-5</maven.version>
45+
<maven.version>3.9.16</maven.version>
4246
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
47+
48+
4349
<!-- Dependency versions -->
4450
<commons-exec.version>1.6.0</commons-exec.version>
4551
<commons-lang.version>2.6</commons-lang.version>
46-
<jackson-bom.version>3.2.1</jackson-bom.version>
52+
<jackson-bom.version>2.18.9</jackson-bom.version>
4753
<java-websocket.version>1.6.0</java-websocket.version>
48-
<junit-jupiter.version>6.1.0</junit-jupiter.version>
54+
<junit-jupiter.version>5.11.4</junit-jupiter.version>
4955
<junit.version>4.13.2</junit.version>
5056
<lombok.version>1.18.46</lombok.version>
5157
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -68,11 +74,12 @@
6874
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
6975
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
7076
</properties>
77+
7178
<dependencyManagement>
7279
<dependencies>
7380
<!-- For Jackson BOM -->
7481
<dependency>
75-
<groupId>tools.jackson</groupId>
82+
<groupId>com.fasterxml.jackson</groupId>
7683
<artifactId>jackson-bom</artifactId>
7784
<version>${jackson-bom.version}</version>
7885
<type>pom</type>
@@ -122,10 +129,11 @@
122129
</dependency>
123130
</dependencies>
124131
</dependencyManagement>
132+
125133
<dependencies>
126134
<!-- For Jackson -->
127135
<dependency>
128-
<groupId>tools.jackson.core</groupId>
136+
<groupId>com.fasterxml.jackson.core</groupId>
129137
<artifactId>jackson-databind</artifactId>
130138
</dependency>
131139
<!-- For Commons Exec -->
@@ -161,6 +169,7 @@
161169
<scope>test</scope>
162170
</dependency>
163171
</dependencies>
172+
164173
<distributionManagement>
165174
<repository>
166175
<id>2624322-release-6F6h6R</id>
@@ -171,16 +180,19 @@
171180
<url>https://packages.aliyun.com/6927b116e6c3e0425dbdf60d/maven/2624322-snapshot-3eoov3</url>
172181
</snapshotRepository>
173182
</distributionManagement>
183+
174184
<build>
175185
<pluginManagement>
176186
<plugins>
187+
177188
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-clean-plugin -->
178189
<plugin>
179190
<!-- 清理插件:清理构建输出目录 -->
180191
<groupId>org.apache.maven.plugins</groupId>
181192
<artifactId>maven-clean-plugin</artifactId>
182193
<version>${maven-clean-plugin.version}</version>
183194
</plugin>
195+
184196
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
185197
<plugin>
186198
<!-- 编译插件:编译主代码至主输出目录 -->
@@ -201,13 +213,15 @@
201213
</annotationProcessorPaths>
202214
</configuration>
203215
</plugin>
216+
204217
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-deploy-plugin -->
205218
<plugin>
206219
<!-- 发布插件:将项目输出构件部署到远程仓库 -->
207220
<groupId>org.apache.maven.plugins</groupId>
208221
<artifactId>maven-deploy-plugin</artifactId>
209222
<version>${maven-deploy-plugin.version}</version>
210223
</plugin>
224+
211225
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-enforcer-plugin -->
212226
<plugin>
213227
<!-- 环境检查插件:代码编译前的环境监察 -->
@@ -224,8 +238,8 @@
224238
<configuration>
225239
<rules>
226240
<requireMavenVersion>
227-
<message><![CDATA[You are running an older version of Maven. This application requires at least Maven 4.]]></message>
228-
<version>[4.0.0,)</version>
241+
<message>You are running an older version of Maven. This application requires at least Maven ${maven.version}.</message>
242+
<version>[${maven.version}.0,)</version>
229243
</requireMavenVersion>
230244
<requireJavaVersion>
231245
<message>You are running an older version of Java. This application requires at least JDK ${java.version}.</message>
@@ -236,6 +250,7 @@
236250
</execution>
237251
</executions>
238252
</plugin>
253+
239254
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
240255
<plugin>
241256
<!-- 签名插件:对制品进行 PGP 签名 -->
@@ -252,13 +267,15 @@
252267
</execution>
253268
</executions>
254269
</plugin>
270+
255271
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-install-plugin -->
256272
<plugin>
257273
<!-- 安装插件:将项目输出构件安装到本地仓库 -->
258274
<groupId>org.apache.maven.plugins</groupId>
259275
<artifactId>maven-install-plugin</artifactId>
260276
<version>${maven-install-plugin.version}</version>
261277
</plugin>
278+
262279
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin -->
263280
<plugin>
264281
<!-- 资源插件:复制主资源文件至主输出目录 -->
@@ -269,6 +286,7 @@
269286
<encoding>${project.build.sourceEncoding}</encoding>
270287
</configuration>
271288
</plugin>
289+
272290
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-release-plugin -->
273291
<plugin>
274292
<!-- 发布管理插件:版本发布与标签管理 -->
@@ -283,6 +301,7 @@
283301
<goals>deploy</goals>
284302
</configuration>
285303
</plugin>
304+
286305
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
287306
<plugin>
288307
<!-- 源码插件:发布时自动将源码同时发布 -->
@@ -301,6 +320,7 @@
301320
</execution>
302321
</executions>
303322
</plugin>
323+
304324
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
305325
<plugin>
306326
<!-- 单元测试插件:执行测试用例 -->
@@ -310,7 +330,7 @@
310330
<configuration>
311331
<skip>false</skip>
312332
<skipTests>false</skipTests>
313-
<argLine>@{argLine} -Xmx1024m -Dfile.encoding=UTF-8</argLine>
333+
<argLine>-Xmx1024m -Dfile.encoding=UTF-8</argLine>
314334
<additionalClasspathElements>
315335
<additionalClasspathElement>${basedir}/target/test-classes</additionalClasspathElement>
316336
</additionalClasspathElements>
@@ -322,6 +342,7 @@
322342
</excludes>
323343
</configuration>
324344
</plugin>
345+
325346
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
326347
<plugin>
327348
<!-- jar 包生成插件:创建项目 jar 包 -->
@@ -338,6 +359,7 @@
338359
</archive>
339360
</configuration>
340361
</plugin>
362+
341363
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
342364
<plugin>
343365
<!-- 文档插件:发布时自动生成 Javadoc 并发布 -->
@@ -360,6 +382,7 @@
360382
</execution>
361383
</executions>
362384
</plugin>
385+
363386
<!-- https://mvnrepository.com/artifact/org.sonatype.central/central-publishing-maven-plugin -->
364387
<plugin>
365388
<!-- 发布插件:将制品发布到 Maven Central Portal -->
@@ -376,6 +399,7 @@
376399
</plugins>
377400
</pluginManagement>
378401
<plugins>
402+
379403
<!-- https://mvnrepository.com/artifact/org.jacoco/jacoco-maven-plugin -->
380404
<plugin>
381405
<!-- 覆盖率插件:生成覆盖率报告并校验测试覆盖率(目标 90%) -->
@@ -420,6 +444,7 @@
420444
</execution>
421445
</executions>
422446
</plugin>
447+
423448
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
424449
<plugin>
425450
<!-- 编译插件:编译主代码至主输出目录 -->
@@ -442,88 +467,98 @@
442467
</plugin>
443468
</plugins>
444469
</build>
470+
445471
<profiles>
446472
<profile>
447473
<id>disable-javadoc-doclint</id>
448474
<activation>
449475
<jdk>[1.8,)</jdk>
450476
</activation>
451-
<properties>
452-
<!-- Dependency versions -->
453-
<additionalparam>-Xdoclint:none -Xlint:unchecked</additionalparam>
454-
</properties>
455477
</profile>
456478
<!-- 发布到 Maven Central Portal:mvn -Prelease deploy(GPG 签名 + 源码 + Javadoc + Central 发布插件) -->
479+
457480
<profile>
458481
<id>release</id>
459482
<build>
460483
<plugins>
484+
461485
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-enforcer-plugin -->
462486
<plugin>
463487
<!-- 环境检查插件:代码编译前的环境监察 -->
464488
<groupId>org.apache.maven.plugins</groupId>
465489
<artifactId>maven-enforcer-plugin</artifactId>
466490
</plugin>
491+
467492
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
468493
<plugin>
469494
<!-- 编译插件:编译主代码至主输出目录 -->
470495
<groupId>org.apache.maven.plugins</groupId>
471496
<artifactId>maven-compiler-plugin</artifactId>
472497
</plugin>
498+
473499
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin -->
474500
<plugin>
475501
<!-- 资源插件:复制主资源文件至主输出目录 -->
476502
<groupId>org.apache.maven.plugins</groupId>
477503
<artifactId>maven-resources-plugin</artifactId>
478504
</plugin>
505+
479506
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
480507
<plugin>
481508
<!-- 单元测试插件:执行测试用例 -->
482509
<groupId>org.apache.maven.plugins</groupId>
483510
<artifactId>maven-surefire-plugin</artifactId>
484511
</plugin>
512+
485513
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
486514
<plugin>
487515
<!-- jar 包生成插件:创建项目 jar 包 -->
488516
<groupId>org.apache.maven.plugins</groupId>
489517
<artifactId>maven-jar-plugin</artifactId>
490518
</plugin>
519+
491520
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
492521
<plugin>
493522
<!-- 源码插件:发布时自动将源码同时发布 -->
494523
<groupId>org.apache.maven.plugins</groupId>
495524
<artifactId>maven-source-plugin</artifactId>
496525
</plugin>
526+
497527
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
498528
<plugin>
499529
<!-- 文档插件:发布时自动生成 Javadoc 并发布 -->
500530
<groupId>org.apache.maven.plugins</groupId>
501531
<artifactId>maven-javadoc-plugin</artifactId>
502532
</plugin>
533+
503534
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-install-plugin -->
504535
<plugin>
505536
<!-- 安装插件:将项目输出构件安装到本地仓库 -->
506537
<groupId>org.apache.maven.plugins</groupId>
507538
<artifactId>maven-install-plugin</artifactId>
508539
</plugin>
540+
509541
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
510542
<plugin>
511543
<!-- 签名插件:对制品进行 PGP 签名 -->
512544
<groupId>org.apache.maven.plugins</groupId>
513545
<artifactId>maven-gpg-plugin</artifactId>
514546
</plugin>
547+
515548
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-deploy-plugin -->
516549
<plugin>
517550
<!-- 发布插件:将项目输出构件部署到远程仓库 -->
518551
<groupId>org.apache.maven.plugins</groupId>
519552
<artifactId>maven-deploy-plugin</artifactId>
520553
</plugin>
554+
521555
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-release-plugin -->
522556
<plugin>
523557
<!-- 发布管理插件:版本发布与标签管理 -->
524558
<groupId>org.apache.maven.plugins</groupId>
525559
<artifactId>maven-release-plugin</artifactId>
526560
</plugin>
561+
527562
<!-- https://mvnrepository.com/artifact/org.sonatype.central/central-publishing-maven-plugin -->
528563
<plugin>
529564
<!-- 发布插件:将制品发布到 Maven Central Portal -->
@@ -534,4 +569,5 @@
534569
</build>
535570
</profile>
536571
</profiles>
572+
537573
</project>

0 commit comments

Comments
 (0)