Skip to content

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

@MarcelEdmundFranke

Description

@MarcelEdmundFranke

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions