console module uses java.net.http.HttpClient (requires Java 11+) but inherits Java 1.8 compilation settings from parent POM, causing compilation errors
envgap__apache__incubator-seata-8178
01 / FAILURE SIGNATURE
As reported upstream
When running the `console` module in IDEA, a compilation error related to `java.net.http.HttpClient` occurs:
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
8d522f0684029f2740f8d862eaf9b97588a07a6f- Manifest
console/pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
apache/incubator-seata #8178 · read the original issue
### Check Ahead
- [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.
- [x] I am willing to try to fix this bug myself.
### Ⅰ. Issue Description
The `console` module uses `java.net.http.HttpClient` (introduced in Java 11), but the module is compiled with Java 8 compatibility settings inherited from the parent POM. This causes compilation errors when running in IDEA.
### Ⅱ. Describe what happened
When running the `console` module in IDEA, a compilation error related to `java.net.http.HttpClient` occurs:
<img width="2092" height="1365" alt="Image" src="https://github.com/user-attachments/assets/e32d08b3-928d-4f30-a457-4e44f69309aa" />
**video**
https://github.com/user-attachments/assets/27275343-a77d-4a66-9d33-f59e6b8d5173
**Root Cause Analysis:**
1. `java.net.http.HttpClient` was added in Java 11.

2. The `console` module does not explicitly configure `java.version`, `maven.compiler.source`, or `maven.compiler.target`.
3. The `console` module's parent is `org.apache.seata:seata-parent`, which also does not define these properties.
4. `org.apache.seata:seata-parent`'s parent is `org.apache.seata:seata-build`, which configures:
```xml
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
```
5. As a result, the `console` module inherits Java 1.8 compile target, but the source code uses `java.net.http.HttpClient` which requires Java 11+.
### Ⅲ. Describe what you expected to happen
The `console` module should compile successfully with a Java version that supports `java.net.http.HttpClient` (Java 11+), without compilation errors in IDEA.
### Ⅳ. How to reproduce it (as minimally and precisely as possible)
1. Open the Seata project in IntelliJ IDEA.
2. Navigate to the `console` module.
3. Observe the compilation error on `java.net.http.HttpClient` usage — it will be flagged as unavailable because the module is configured with Java 1.8 source/target level.
4. The error occurs because `java.net.http.HttpClient` is available starting from Java 11, but the inherited Maven compiler settings target Java 1.8.
### Ⅴ. Anything else we need to know?
The fix is to add the following properties to `console/pom.xml`:
```xml
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
```
This overrides the inherited Java 1.8 setting from `seata-build` and aligns with the Spring Boot 4.0.6 / Spring Framework 7.0.7 baseline already used in the console module.
### Ⅵ. Environment
IntelliJ IDEA 2026.2.0.104 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]