diff --git a/docs/src/main/asciidoc/adapters/gcp-intro.adoc b/docs/src/main/asciidoc/adapters/gcp-intro.adoc index 23e64010e..74ce1e09b 100644 --- a/docs/src/main/asciidoc/adapters/gcp-intro.adoc +++ b/docs/src/main/asciidoc/adapters/gcp-intro.adoc @@ -66,7 +66,21 @@ curl http://localhost:8080/ -d "hello" As of March 2020, Google Cloud Functions for Java is in Alpha. You can get on the https://docs.google.com/forms/d/e/1FAIpQLScC98jGi7CfG0n3UYlj7Xad8XScvZC8-BBOg7Pk3uSZx_2cdQ/viewform[whitelist] to try it out. -First, add the Shade Plugin configuration to generate a fat jar when you run the `mvn package` command. +To deploy to Google Cloud Function, you need to produce a fat jar using the Shade plugin, rather than the Spring Boot plugin. + +First, if you already have the Spring Boot plugin in your `pom.xml`, *remove* it: +[source, xml] +---- + + +---- + +Then, *add* the Shade Plugin configuration to generate a fat jar when you run the `mvn package` command. [source, xml] ---- @@ -104,6 +118,8 @@ First, add the Shade Plugin configuration to generate a fat jar when you run the ---- +IMPORTANT: If both Spring Boot plugin and Shade plugin are present, Shade plugin may be shading a Spring Boot produced JAR, resulting in a Fat JAR that's unusable in Google Cloud Function. Don't forget to remove the Spring Boot plugin! + Package the application. ----