Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mvn clean package issue + project installation question #218

Closed
sambk17 opened this issue Aug 26, 2023 · 7 comments
Closed

mvn clean package issue + project installation question #218

sambk17 opened this issue Aug 26, 2023 · 7 comments

Comments

@sambk17
Copy link

sambk17 commented Aug 26, 2023

Description

I previously use openapi-generator until v7.0.0 decommissioned the python client generator

I am new to opeanpi-json-schema-generator (previously used openapi-generator) and attempted the following to install based on the README:

Getting Started

I used:

git clone https://github.com/openapi-json-schema-tools/openapi-json-schema-generator
cd openapi-json-schema-generator
mvn clean package

This resulted in the following error:

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   URLPathUtilsTest.testGetServerURLWithVariables:115 expected [https://{user}.example.com/v1] but found [http://localhost]
[INFO]
[ERROR] Tests run: 463, Failures: 1, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  36.743 s
[INFO] Finished at: 2023-08-25T16:20:21-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.1.2:test (default-test) on project openapi-json-schema-generator-cli: There are test failures.
[ERROR]
[ERROR] Please refer to /{local_pathway}/openapi-json-schema-generator/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [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/MojoFailureException
Install Jar directly from maven.org

Within the README, "You can also download the JAR (latest release) directly from maven.org"

⬆️ This link above does not exist (404) ⬆️ . In maven.org, I could not search for openapi-json-schema-generator-cli. Does this exist?

openapi-generator version

v3.0.0

OpenAPI declaration file content or url

N/A

Command line used for generation

N/A

Steps to reproduce

N/A

Related issues/PRs

N/A

Suggest a fix/enhancement
  • Will a v3.0.0 of the JAR be uploaded to maven.org?
@spacether
Copy link
Contributor

spacether commented Aug 26, 2023

At this time I do not plan on publishing to maven. If more users desire it, I can add it.

Some questions for you:

  1. Can you use the docker images?
  2. What is your operating system and architecture?
  3. What is your Java version?
  4. What is your mvn version?

I need this info to reproduce the bug as all tests are currently passing locally and in CI

@spacether spacether changed the title README Support - How to Install openapi-json-schema-generator mvn clean package issue + project installation question Aug 26, 2023
@sambk17
Copy link
Author

sambk17 commented Aug 26, 2023

At this time I do not plan on publishing to maven. If more users desire it, I can add it.

Some questions for you:

  1. Can you use the docker images?
  2. What is your operating system and architecture?
  3. What is your Java version?
  4. What is your mvn version?

I need this info to reproduce the bug as all tests are currently passing locally and in CI

  1. I will set up Docker to test after I have changed out my GitHub workflows over from openapi-generator to openapi-json-schema-generator. I'll post here if I run into issues there.
  2. OS = macOS 13.5. The current architecture consists of A) generating the Python SDK Client from the openapi.yaml and B) Using Prism to Mock a Server to perform unit tests. That's it (so far) 😄
  3. Java 19.0.1
  4. mvn 3.9.4

@spacether
Copy link
Contributor

Hmm I wonder if this is a Java 19 issue. We are both on Mac oses.

@spacether
Copy link
Contributor

@sambk17 does it work if you use Java 11?

@sambk17
Copy link
Author

sambk17 commented Aug 28, 2023

Hi @spacether 👋 - I changed out the Java version (11.0.19) and it worked!!

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  48.690 s
[INFO] Finished at: 2023-08-28T08:45:53-07:00
[INFO] ------------------------------------------------------------------------

Any chance is there an explanation for the difference in Java version? 😄

@spacether
Copy link
Contributor

Glad to hear it. Not sure why one would have this bug and the other wouldn't. I changed from Java 8 to Java 11 because 11 is the oldest active long term support (LTS) release. The next LTS release after 11 is 17.

@sambk17
Copy link
Author

sambk17 commented Aug 29, 2023

Update: I have also tested this within an ubuntu-latest GitHub Actions Workflow using Java 11 and it also works as expected.

@spacether - Thanks again for helping clarify things. I will mark this as Closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants