java.util.concurrent.ExecutionException: java.lang.ClassCastException: class com.google.cloud.tools.jib.image.json.OciIndexTemplate cannot be cast to class com.google.cloud.tools.jib.image.json.V22ManifestListTemplate (com.google.cloud.tools.jib.image.json.OciIndexTemplate and com.google.cloud.tools.jib.image.json.V22ManifestListTemplate are in unnamed module of loader 'app')
Jib cli not released with latest jib-core version. As a result it leads to already fixed issue https://github.com/GoogleContainerTools/jib/pull/3974
Steps to repro:
1) jib.yaml
2) Execute command twice (to make cache work) jib build --target=docker://jib-cli-quickstart
3) Error
java.util.concurrent.ExecutionException: java.lang.ClassCastException: class com.google.cloud.tools.jib.image.json.OciIndexTemplate cannot be cast to class com.google.cloud.tools.jib.image.json.V22ManifestListTemplate (com.google.cloud.tools.jib.image.json.OciIndexTemplate and com.google.cloud.tools.jib.image.json.V22ManifestListTemplate are in unnamed module of loader 'app')
Workaround: build jib cli from source