Skip to content

Conversation

@MosheElisha
Copy link
Contributor

@MosheElisha MosheElisha commented Jun 19, 2020

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Fix #6260 - make plugin thread safe by preventing parallelism.

This naive approach should be replaced in the future and allow parallel runs to achieve faster build times but this change will at least allow users to run maven with threads and other plugins and modules will run in parallel.

I have used the generated SNAPSHOT plugin locally on my project and it fixed the issue. I also ran the ./bin/java-petstore-all.sh and it passed.

This approach is also suggested by Apache Maven as a workaround: https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3

…ism. This naive approach should be replaced in the future and allow parallel runs to achieve faster build times but this change will at least allow users to run maven with threads and other plugins and modules will run in parallel. This approach is also suggested by Apache Maven as a workaround: https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3
@MosheElisha
Copy link
Contributor Author

@wing328 / @frantuma - Please review

@frantuma frantuma self-assigned this Jun 22, 2020
@frantuma frantuma added this to the M4 milestone Jun 22, 2020
@frantuma frantuma merged commit 9eb3224 into swagger-api:master Jun 24, 2020
@frantuma
Copy link
Contributor

Thanks! I agree with your comments above, a better handling is in roadmap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

swagger-codegen-maven-plugin threadsafe?

2 participants