OpenAPITools / OpenAPITools/openapi-generator
[BUG] [JAVA] Maven 3.9.0 not compatible with 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
Bug Report Checklist
- [x ] Have you provided a full/minimal spec to reproduce the issue?
- [ x] Have you validated the input using an OpenAPI validator (example)?
- [x ] Have you tested with the latest master to confirm the issue still exists?
- [ x] Have you searched for related issues/PRs?
- [x ] What's the actual output vs expected output?
- [ x] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
I was setting up my new laptop the same way as I had been using openapi-generator in the past on my old laptop (same type - Macbook pro with same Ventura OS and m1 chip) - installing java and maven and then running my java application which uses the openapi-generator-maven-plugin. I kept getting a NPE when running "mvn clean install" on my project (which uses Java 8). My maven version was 3.9.0 (the default when running brew install maven). The only difference between my old and new laptop was this maven version. Others who were able to run the same project were using a maven version less than 3.9.0, so I changed the version to 3.8.8 and now I'm not getting the NPE.
openapi-generator version
5.1.0
OpenAPI declaration file content or url
https://mvnrepository.com/artifact/org.openapitools/openapi-generator-maven-plugin/5.1.0
Note: I don't feel comfortable sharing too much about the stacktrace and details since this is specific to my company and I don't want to inadvertently share something I shouldn't.
Generation Details
openapi-generator-maven-plugin:pom:5.1.0
Java: 1.8.0_201
maven: apache-maven-3.8.8
Steps to reproduce
Install and use maven 3.9.0 on a java 8 project - run "mvn clean install" and see Build Failure with a Null Pointer Exception (not a lot of information here). I did save the stacktrace if you want to reach out to me and we can discuss. I just don't want to share anything specific relating my company.
Related issues/PRs
none
Suggest a fix
Change maven version to 3.8.8 - this worked for me. I know others running the same project are using 3.8.8 or lower.
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 by reproducing the reported failure with openapi-generator-maven-plugin 5.1.0 in a Java 8 project using Maven 3.9.0, then compare it with Maven 3.8.8 using mvn clean install. Obtain a shareable stack trace and trace the Null Pointer Exception to determine the compatibility issue; done means the build succeeds on the affected Maven version with suitable verification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100