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
  • #14970
Closed
Open
Issue created Mar 15, 2023 by Caroline Stewart@scarol8

[BUG] [JAVA] Maven 3.9.0 not compatible with openapi-generator-maven-plugin

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.

Assignee
Assign to
Time tracking