apache / apache/maven-compiler-plugin
maven-compiler-plugin: Switch from 3.11.0 >= 3.11.0 causes my org.openapitools.openapi-generator:7.11.0 to suddenly fail
- Dominant language
- Java
- Stars
- 261
- Forks
- 191
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 8
Description
### Affected version
3.12.0, 3.13.0, 3.14.0
### Bug description
After upgrading the maven-compiler-plugin from version 3.11.0 to any version >= 3.11.0, the OpenAPI Generator (org.openapitools:openapi-generator-maven-plugin:7.11.0) fails during the build process. The error occurs consistently across all generated OpenAPI source files.
#### Error Message (example):
[ERROR] /Users/xxx/workspace/xxx/xxx/target/generated-sources/openapi/src/main/java/com/example/project/model/MaskedDto.java: error reading /Users/xxx/workspace/xxx/xxx/target/generated-sources/openapi/src/main/java/com/example/project/model/MaskedDto.java; /Users/xxx/workspace/xxx/xxx/target/generated-sources/openapi/src/main/java/com/example/project/model/MaskedDto.java
This issue affects all OpenAPI-generated files, not just the one shown above.
#### Steps to Reproduce:
1. Use openapi-generator-maven-plugin version 7.11.0 to generate sources.
2. Set maven-compiler-plugin to any version >= 3.11.0.
3. Run mvn clean install.
Observe the build failure with file read errors on generated sources.
#### Expected Behavior:
The build should succeed without file read errors when using maven-compiler-plugin versions >= 3.11.0.
#### Workaround:
Reverting to maven-compiler-plugin version 3.11.0 resolves the issue.
#### Environment:
Maven: 3.9.10
Java: 21
OS: macOS 15.5
OpenAPI Generator: 7.11.0 - Upgrading to 7.14.0 is not fixing this
maven-compiler-plugin: >= 3.11.0 (issue), 3.11.0 (works)
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with Maven 3.9.10, Java 21, OpenAPI Generator 7.11.0, and the reported maven-compiler-plugin versions using `mvn clean install`. Start by examining the generated-sources/openapi/.../MaskedDto.java read error and compare the working 3.11.0 build with affected versions. Done means generated OpenAPI sources compile successfully without file read errors on the affected versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100