The script tries to download https://api.github.com/repos/openapitools/openapi-generator/releases and parse the latest version, but the download sometimes can fail and the script results in an error:
jq: error (at :1): Cannot index string with string "prerelease"
Yet the script continues the maven build for the jar file and finally fails with error
"[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.9:get (default-cli) on project standalone-pom: Invalid artifact, you must specify groupId:artifactId:version[:packaging][:classifier] org.openapitools:openapi-generator-cli"
The script should not continue to run if the version parsing fails, or it should substitute with a default version.