Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Windows 10
Description
Repro steps:
- Start your Windows machine
- Check out the code to a local folder
- Execute the following command
$ ./gradlew clean test
- Error happens that the swagger file could not be found
Proposed solution:
In fineract-client, instead of using the
inputSpec = "file://$swaggerFile"
format, use the following one (without _file://)_
inputSpec = "$swaggerFile"
Error logs:
$ ./gradlew clean test > Task :fineract-provider:compileJava Found no persistent property in "org.apache.fineract.infrastructure.dataqueries.domain.ReportParameter"> Task :fineract-client:buildJavaSdk Exception while reading: java.lang.RuntimeException: Could not find file://C:/Users/<folder>/fineract/fineract-provider/build/generated/swagger-ui/fineract.yaml on the classpath at io.swagger.v3.parser.util.ClasspathHelper.loadFileFromClasspath(ClasspathHelper.java:31) at io.swagger.v3.parser.OpenAPIV3Parser.readWithInfo(OpenAPIV3Parser.java:150) at io.swagger.v3.parser.OpenAPIV3Parser.readLocation(OpenAPIV3Parser.java:59) at io.swagger.parser.OpenAPIParser.readLocation(OpenAPIParser.java:16) at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:461) at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:507) at org.openapitools.generator.gradle.plugin.tasks.GenerateTask.doWork(GenerateTask.kt:634) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58) ... at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61) at java.base/java.lang.Thread.run(Thread.java:833) failed to read resource listing java.lang.RuntimeException: Could not find file://C:/Users/<folder>/fineract/fineract-provider/build/generated/swagger-ui/fineract.yaml on the classpath at io.swagger.parser.util.ClasspathHelper.loadFileFromClasspath(ClasspathHelper.java:31) at io.swagger.parser.SwaggerCompatConverter.readResourceListing(SwaggerCompatConverter.java:207) at io.swagger.parser.SwaggerCompatConverter.read(SwaggerCompatConverter.java:123) at io.swagger.parser.SwaggerCompatConverter.readWithInfo(SwaggerCompatConverter.java:94) at io.swagger.parser.SwaggerParser.readWithInfo(SwaggerParser.java:42) at io.swagger.v3.parser.converter.SwaggerConverter.readLocation(SwaggerConverter.java:89) at io.swagger.parser.OpenAPIParser.readLocation(OpenAPIParser.java:16) at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:461) at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:507) at org.openapitools.generator.gradle.plugin.tasks.GenerateTask.doWork(GenerateTask.kt:634) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58) ... at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61) at java.base/java.lang.Thread.run(Thread.java:833) There were issues with the specification, but validation has been explicitly disabled. Errors: -unable to read location `file://C:/Users/<folder>/fineract/fineract-provider/build/generated/swagger-ui/fineract.yaml` > Task :fineract-client:buildJavaSdk FAILED> Task :fineract-client:buildTypescriptAngularSdk FAILED Exception while reading: java.lang.RuntimeException: Could not find file://C:/Users/<folder>/fineract/fineract-provider/build/generated/swagger-ui/fineract.yaml on the classpath at io.swagger.v3.parser.util.ClasspathHelper.loadFileFromClasspath(ClasspathHelper.java:31) at io.swagger.v3.parser.OpenAPIV3Parser.readWithInfo(OpenAPIV3Parser.java:150) at io.swagger.v3.parser.OpenAPIV3Parser.readLocation(OpenAPIV3Parser.java:59) at io.swagger.parser.OpenAPIParser.readLocation(OpenAPIParser.java:16) at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:461) at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:507) at org.openapitools.generator.gradle.plugin.tasks.GenerateTask.doWork(GenerateTask.kt:634) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58) ... at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61) at java.base/java.lang.Thread.run(Thread.java:833) failed to read resource listing java.lang.RuntimeException: Could not find file://C:/Users/<folder>/fineract/fineract-provider/build/generated/swagger-ui/fineract.yaml on the classpath at io.swagger.parser.util.ClasspathHelper.loadFileFromClasspath(ClasspathHelper.java:31) at io.swagger.parser.SwaggerCompatConverter.readResourceListing(SwaggerCompatConverter.java:207) at io.swagger.parser.SwaggerCompatConverter.read(SwaggerCompatConverter.java:123) at io.swagger.parser.SwaggerCompatConverter.readWithInfo(SwaggerCompatConverter.java:94) at io.swagger.parser.SwaggerParser.readWithInfo(SwaggerParser.java:42) at io.swagger.v3.parser.converter.SwaggerConverter.readLocation(SwaggerConverter.java:89) at io.swagger.parser.OpenAPIParser.readLocation(OpenAPIParser.java:16) at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:461) at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:507) at org.openapitools.generator.gradle.plugin.tasks.GenerateTask.doWork(GenerateTask.kt:634) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58) ... at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61) at java.base/java.lang.Thread.run(Thread.java:833) There were issues with the specification, but validation has been explicitly disabled. Errors: -unable to read location `file://C:/Users/<folder>/fineract/fineract-provider/build/generated/swagger-ui/fineract.yaml`Output directory does not exist, or is inaccessible. No file (.openapi-generator-ignore) will be evaluated.> Task :fineract-client:spotlessGroovyGradle Errors occurred while build effective model from C:\Users\<user>\.gradle\caches\modules-2\files-2.1\org.eclipse.platform\org.eclipse.swt\3.118.0\b60133390917395749790e570e448e11c51a312d\org.eclipse.swt-3.118.0.pom: 'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. in org.eclipse.platform:org.eclipse.swt:3.118.0 Unknown file extension: fineract-client\src\main\resources\.gitkeepFAILURE: Build completed with 2 failures.1: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':fineract-client:buildJavaSdk'. > Code generation failed.* 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. ==============================================================================2: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':fineract-client:buildTypescriptAngularSdk'. > Code generation failed.* 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.orgDeprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warningsBUILD FAILED in 1m 57s 27 actionable tasks: 23 executed, 1 from cache, 3 up-to-date
Attachments
Issue Links
- links to