From 06bb7c9cc9556bede6d4c6461a42faf3c56740ed Mon Sep 17 00:00:00 2001 From: Ray Tsang Date: Wed, 8 Apr 2020 17:44:14 -0400 Subject: [PATCH] Mention removing Spring Boot plugin Resolves #488 --- docs/src/main/asciidoc/adapters/gcp-intro.adoc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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. ----