Skip to content

Commit 72aaacb

Browse files
committed
build(validation): 对齐多 JDK 版本线基线
1 parent 05cc58b commit 72aaacb

3 files changed

Lines changed: 23 additions & 11 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
java: [17, 21]
19+
java: [21]
2020
steps:
2121
- uses: actions/checkout@v4
2222
- uses: actions/setup-java@v4
@@ -58,4 +58,4 @@ jobs:
5858
- name: Check current public API against baseline
5959
run: >-
6060
mvn -B -ntp -f current/pom.xml clean verify -Papi-compatibility
61-
-Dapi.compatibility.version=1.0.x.20260630-SNAPSHOT
61+
-Dapi.compatibility.version=3.0.x.20260630-SNAPSHOT

‎README.md‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,18 @@
88
| --- | --- | --- | --- |
99
| `feature/1.0.x` | 8 | Javax Validation 2.0.1 | `1.0.x.20260630-SNAPSHOT` |
1010
| `feature/2.0.x` | 17 | Javax Validation 2.0.1 | `2.0.x.20260630-SNAPSHOT` |
11-
| `feature/3.0.x` | 17 | Jakarta Validation 3.1.1 | `3.0.x.20260630-SNAPSHOT` |
11+
| `feature/3.0.x` | 21 | Jakarta Validation 3.1.1 | `3.0.x.20260630-SNAPSHOT` |
12+
13+
除 Bean Validation 的 `javax` / `jakarta` 命名空间适配外,三个版本线保持相同的公共 API、实现逻辑、注释和文档。
14+
依赖基线随 JDK 版本线递进,避免将较高 JDK 专用依赖带入低版本运行时:
15+
16+
| 关键依赖 | `1.0.x` | `2.0.x` | `3.0.x` |
17+
| --- | --- | --- | --- |
18+
| Apache Tika | 2.9.4 | 3.3.1 | 3.3.2 |
19+
| libphonenumber | 9.0.34 | 9.0.35 | 9.0.36 |
20+
| Apache Commons IO | 2.18.0 | 2.20.0 | 2.22.0 |
21+
| Hutool Core | 5.8.45 | 5.8.46 | 5.8.47 |
22+
| Hibernate Validator | 6.1.7.Final | 6.2.5.Final | 9.1.3.Final |
1223

1324
```xml
1425
<dependency>
@@ -27,6 +38,7 @@
2738
<dependency>
2839
<groupId>org.apache.tika</groupId>
2940
<artifactId>tika-parsers-standard-package</artifactId>
41+
<!-- 将版本替换为上表当前版本线对应的 Apache Tika 版本。 -->
3042
<version>2.9.4</version>
3143
</dependency>
3244
```

‎pom.xml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
<properties>
5757
<!-- Java toolchain and project encoding. -->
58-
<java.version>17</java.version>
58+
<java.version>21</java.version>
5959
<maven.compiler.release>${java.version}</maven.compiler.release>
6060
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6161
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -64,19 +64,19 @@
6464
<jakarta-validation.version>3.1.1</jakarta-validation.version>
6565
<jakarta-inject.version>2.0.1</jakarta-inject.version>
6666
<jakarta-activation.version>2.1.3</jakarta-activation.version>
67-
<libphonenumber.version>9.0.34</libphonenumber.version>
67+
<libphonenumber.version>9.0.36</libphonenumber.version>
6868
<commons-lang3.version>3.20.0</commons-lang3.version>
69-
<commons-io.version>2.19.0</commons-io.version>
70-
<slf4j.version>2.0.18</slf4j.version>
69+
<commons-io.version>2.22.0</commons-io.version>
70+
<slf4j.version>2.1.0</slf4j.version>
7171
<lombok.version>1.18.46</lombok.version>
72-
<hutool.version>5.8.46</hutool.version>
72+
<hutool.version>5.8.47</hutool.version>
7373
<jakarta-regexp.version>1.4</jakarta-regexp.version>
7474
<oro.version>2.0.8</oro.version>
75-
<tika.version>3.3.1</tika.version>
75+
<tika.version>3.3.2</tika.version>
7676

7777
<!-- Test dependencies. -->
78-
<junit.version>5.12.2</junit.version>
79-
<hibernate-validator.version>8.0.2.Final</hibernate-validator.version>
78+
<junit.version>6.1.2</junit.version>
79+
<hibernate-validator.version>9.1.3.Final</hibernate-validator.version>
8080
<jakarta-el.version>4.0.2</jakarta-el.version>
8181

8282
<!-- Maven runtime and build plugins. -->

0 commit comments

Comments
 (0)