OpenAPITools / OpenAPITools/openapi-generator
[BUG] Transitive Dependencies Not Found When Using OpenAPI Generator Maven Plugin
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
I added the OpenAPI Generator Maven Plugin as per the instructions found in this README however I was getting a dependency exception at build time since some transitive dependencies were not found. These dependencies includes okhttp3 and gson.
In order to solve the issue, I added the dependencies as specified in the Spring example POM file as mentioned here. It would be great if this could be fixed (or else some clearer instructions are added)
openapi-generator version
4.3.1. Unsure if it is a regression however since I didn't try previous versions.
OpenAPI declaration file content or url
N/A
Command line used for generation
Using OpenJDK 11. Command is simply mvn clean install.
Steps to reproduce
- Add the build plugin to maven as per the instructions in the README
- Run
mvn clean install.
Related issues/PRs
This issue seemed similar however it is gradle specific.
Suggest a fix/enhancement
Having the dependency be a fat jar (i.e. it incldues all the transitive dependencies).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Maven plugin README in modules/openapi-generator-maven-plugin/README.md and compare its setup with modules/openapi-generator-maven-plugin/examples/spring.xml. Reproduce the missing okhttp3 and gson dependencies with OpenJDK 11 by running mvn clean install. Done means the documented plugin setup resolves its transitive dependencies without requiring users to add them separately, or the README clearly documents the required dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100