aws-cloudformation / cloudformation-cli

The CloudFormation Provider Development Toolkit allows you to author your own resource providers and modules that can be used by CloudFormation.
Apache License 2.0
320 stars 163 forks source link

Plugin for the java8 runtime does not support building an image #607

Open aodhan-domhnaill opened 4 years ago

aodhan-domhnaill commented 4 years ago

I'm building some of the recently open sources resource providers,

[aidan@unknowne8d0fc9c5665 aws-codeartifact-domain]$ git config remote.origin.url
git@github.com:aws-cloudformation/aws-cloudformation-resource-providers-codeartifact.git
[aidan@unknowne8d0fc9c5665 aws-codeartifact-domain]$ git log | head -1
commit 161d785532c7f1d42d100989431efe437f411b17
[aidan@unknowne8d0fc9c5665 aws-codeartifact-domain]$ AWS_REGION=us-east-1 mvn clean package
   ...
[aidan@unknowne8d0fc9c5665 aws-codeartifact-domain]$ java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment 18.9 (build 11.0.8+10)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.8+10, mixed mode, sharing)

Running,

[aidan@unknowne8d0fc9c5665 aws-codeartifact-domain]$ cfn build-image --image-name cfn-codeartifact-domain --executable target/aws-codeartifact-domain-handler-1.0-SNAPSHOT.jar 
Plugin for the java8 runtime does not support building an image

What's wrong?

PatMyron commented 3 years ago

Try upgrading the Java Plugin in addition to the main CLI itself:

pip3 install cloudformation-cli cloudformation-cli-java-plugin --upgrade