[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.