-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] openapi-generator-maven-plugin is not marked as threadSafe #5862
Comments
I was torn between bug and "improvement" so feel free to change the issue type. |
@famod I wonder if you can file a PR with the suggested fix when you've time. |
@wing328 I'll gladly do that but is the plugin thread safe after all? I cannot answer this question. |
By coincidence, we've just hit a sproadic build problem which might be a concurrency issue:
You can see that WDYT? |
Description
Building a Maven multimodule project in parallel (e.g.
mvn -T2 ...
) that usesopenapi-generator-maven-plugin
yields the following warning for each plugin execution:openapi-generator version
4.2.3
OpenAPI declaration file content or url
not relevant
Command line used for generation
mvn clean install -T2
(example)Steps to reproduce
Build a multimodule project taht is using
openapi-generator-maven-plugin
in parallel.Related issues/PRs
n/a
Suggest a fix
Add
threadSafe=true
to@Mojo
: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java#L73This assumes that the plugin does handle concurrent invocations (form different modules) without concurrency issues!
The text was updated successfully, but these errors were encountered: