swagger-api / swagger-api/swagger-codegen

Save and restore existing system properties in maven plugin

Open
#2,232 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug Swagger Codegen Maven Plugin
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Currently the maven plugin sets system properties when environmentVariables are specified in the pom. These system properties are never reset however and therefore in a multi-module maven build or in an IDE such as Eclipse those system properties will interfere with other modules that are also using the swagger-codegen maven plugin.

For example if I have module a that generates model objects and module b that generates apis if I run a multi-module build (with a running then b) module b will generate both model objects and apis.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The entry point is the swagger-codegen Maven plugin, which handles environmentVariables during a multi-module build. Start by tracing where those properties are set; done means existing values are restored after plugin execution so one module does not affect another, including IDE use.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.