maven-compiler-plugin icon indicating copy to clipboard operation
maven-compiler-plugin copied to clipboard

maven-compiler-plugin: Switch from 3.11.0 >= 3.11.0 causes my org.openapitools.openapi-generator:7.11.0 to suddenly fail

Open MarcelEdmundFranke opened this issue 6 months ago • 8 comments

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)

MarcelEdmundFranke avatar Jul 01 '25 10:07 MarcelEdmundFranke