<!-- Remove this block by deleting or commenting it out -->
+<!--
+<plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+</plugin>
+-->
+From 21fe196699a5752de8871df2cba8474e5c0aebf6 Mon Sep 17 00:00:00 2001
From: buildmaster
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:
<!-- Remove this block by deleting or commenting it out -->
+<!--
+<plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+</plugin>
+-->
+Then, add the Shade Plugin configuration to generate a fat jar when you run the mvn package command.
| + + | ++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.
You should see the fat jar in deploy directory.
You should see the fat jar in target/deploy directory.
Make sure that you have the Cloud SDK CLI installed.
@@ -2077,7 +2106,7 @@ You can get on the