OpenAPITools / OpenAPITools/openapi-generator

[BUG] Unable to build project on MacOS

Open
#19,289 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Bug Report Checklist
  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Unable to complete mvn clean install on the project. However, I am able to successfully execute mvn clean package

openapi-generator version

I'm building the master branch at the tip of commit 484b87f22a79779ec75f04a672175b702cad7fea

Steps to reproduce
  1. Clone the git repository, checkout the master branch.
  2. Install the specified versions of dependencies. Here is the information about the environment:
image

Observed error log: install-error-log.txt

Related issues/PRs

I could not find related issues. However, other developers have stumbled across this issue, albeit unsuccessfully. Here is a reference to a similar bug (referencing different gradle version) in a README file.

Suggest a fix

This appears to be a mismatch between the gradle version and the java runtime, but I don't know how to fix that.
I'd like to draw your attention to this snippet from the above error log:

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file '/Users/ckeshavabs/openapi-generator/modules/openapi-generator-gradle-plugin/settings.gradle' (/Users/ckeshavabs/.gradle/caches/7.6.4/scripts/qtv78r5dx5edqhhhf13bv6o).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

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

Start by running the reported mvn clean install reproduction on macOS and reading install-error-log.txt, focusing on the settings.gradle failure and unsupported class file version. Compare the project’s Gradle guidance in README.md around line 408 with the reported environment. Done means the project builds successfully with mvn clean install without the class-version error.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.