Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #5862
Closed
Open
Issue created Apr 08, 2020 by Administrator@rootContributor

[BUG] openapi-generator-maven-plugin is not marked as threadSafe

Created by: famod

Description

Building a Maven multimodule project in parallel (e.g. mvn -T2 ...) that uses openapi-generator-maven-plugin yields the following warning for each plugin execution:

[2020-04-08T13:59:47.119Z] [WARNING] *****************************************************************
[2020-04-08T13:59:47.119Z] [WARNING] * Your build is requesting parallel execution, but project      *
[2020-04-08T13:59:47.119Z] [WARNING] * contains the following plugin(s) that have goals not marked   *
[2020-04-08T13:59:47.119Z] [WARNING] * as @threadSafe to support parallel building.                  *
[2020-04-08T13:59:47.119Z] [WARNING] * While this /may/ work fine, please look for plugin updates    *
[2020-04-08T13:59:47.119Z] [WARNING] * and/or request plugins be made thread-safe.                   *
[2020-04-08T13:59:47.119Z] [WARNING] * If reporting an issue, report it against the plugin in        *
[2020-04-08T13:59:47.119Z] [WARNING] * question, not against maven-core                              *
[2020-04-08T13:59:47.119Z] [WARNING] *****************************************************************
[2020-04-08T13:59:47.119Z] [WARNING] The following plugins are not marked @threadSafe in some-module:
[2020-04-08T13:59:47.119Z] [WARNING] org.openapitools:openapi-generator-maven-plugin:4.2.3
[2020-04-08T13:59:47.119Z] [WARNING] Enable debug to see more precisely which goals are not marked @threadSafe.
[2020-04-08T13:59:47.119Z] [WARNING] *****************************************************************
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#L73 This assumes that the plugin does handle concurrent invocations (form different modules) without concurrency issues!

Assignee
Assign to
Time tracking