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
  • #10898
Closed
Open
Issue created Nov 19, 2021 by Administrator@rootContributor4 of 5 checklist items completed4/5 checklist items

[BUG][multiplatform] Test fails

Created by: tkirshboim

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • [not applicable] 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

The integration tests for Kotlin multiplatform fails.

openapi-generator version

Current master branch - commit: https://github.com/OpenAPITools/openapi-generator/commit/126e4061937fabd27a1ac020ca4dcfadb7b1e357

Steps to reproduce

Run the Kotlin multiplatform test by running the following command from the project's root folder:

./mvnw clean integration-test -f samples/client/petstore/kotlin-multiplatform/pom.xml

Expected: The test succeeds.

Actual: The test fails. See console output:

$ ./mvnw integration-test -f samples/client/petstore/kotlin-multiplatform/pom.xml 
[INFO] Scanning for projects...
[INFO] 
[INFO] -------< org.openapitools:kotlin-client-petstore-multiplatform >--------
[INFO] Building OpenAPI Petstore 1.0.0
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:copy-dependencies (default) @ kotlin-client-petstore-multiplatform ---
[WARNING] The artifact xml-apis:xml-apis:jar:2.0.2 has been relocated to xml-apis:xml-apis:jar:1.0.b2
[INFO] 
[INFO] --- exec-maven-plugin:1.2.1:exec (bundle-test) @ kotlin-client-petstore-multiplatform ---

FAILURE: Build failed with an exception.

* Where:
Settings file './samples/client/petstore/kotlin-multiplatform/settings.gradle.kts' line: 1

* What went wrong:
There is no feature named GRADLE_METADATA

* 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

BUILD FAILED in 661ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.121 s
[INFO] Finished at: 2021-11-19T14:25:46+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (bundle-test) on project kotlin-client-petstore-multiplatform: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [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
Suggest a fix

The Gradle wrapper was upgraded to version 7.0.2 in #10468 but the obsolete GRADLE_METADATA Gradle feature preview flag was not removed from the template's settings.gradle file.

However, removing the obsolete GRADLE_METADATA is not sufficient to make the tests pass again. Upgrading Kotlin to version 1.5.31 together with upgrading the related dependencies is also necessary for the tests to pass.

I have a fix for this issue on a branch and I intend to create a PR for it. You can see the changes that I've done to resolve the issue here.

Assignee
Assign to
Time tracking