OpenAPITools / OpenAPITools/openapi-generator

[BUG] failed to build

Open
#9,804 0 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

It appears building openapi-generator-cli.jar doesn't work properly without JAVA_HOME anymore.
Maybe JAVA_HOME should be mentioned in the instruction 1.4 - Build Projects.

✔ ~/git/github/OpenAPITools/openapi-generator [master|✔]
11:56 $ git log -1
commit 41afcd0f8646f72a5d9975cd9abbb7c972124c16 (HEAD -> master, origin/master, origin/HEAD)
Author: Minjae Kim <haedaal@gmail.com>
Date:   Fri Jun 18 17:34:38 2021 +0900

    Handle boolean enum correctly in typescript-axios (#9025)
    
    can't use enum because of TS18033
12:00 $ mvn clean install
..
[INFO] --- maven-javadoc-plugin:3.1.0:jar (attach-javadocs) @ openapi-generator-core ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for openapi-generator-project 5.2.0-SNAPSHOT:
[INFO] 
[INFO] openapi-generator-project .......................... SUCCESS [  1.537 s]
[INFO] openapi-generator-core ............................. FAILURE [  4.290 s]
[INFO] openapi-generator (core library) ................... SKIPPED
[INFO] openapi-generator (executable) ..................... SKIPPED
[INFO] openapi-generator (maven-plugin) ................... SKIPPED
[INFO] openapi-generator-gradle-plugin (maven wrapper) .... SKIPPED
[INFO] openapi-generator-online ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.131 s
[INFO] Finished at: 2021-06-18T12:00:53+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.0:jar (attach-javadocs) on project openapi-generator-core: MavenReportException: Error while generating Javadoc: Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :openapi-generator-core

Setting JAVA_HOME solved the issue: JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ mvn clean install

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 with the linked “1.4 - Build Projects” instructions and compare them with the reported mvn clean install failure. Update the build guidance to cover the JAVA_HOME prerequisite, then verify the documented command against the reported Java setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, documentation
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.