From dda035968ea1fd504718caa1b135d8ec18997bf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mathieu?= Date: Tue, 23 Nov 2021 15:00:36 +0100 Subject: [PATCH] App Engine Standard should always use the uberjar Fixes #21564 --- .../asciidoc/deploying-to-google-cloud.adoc | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/docs/src/main/asciidoc/deploying-to-google-cloud.adoc b/docs/src/main/asciidoc/deploying-to-google-cloud.adoc index e927b3c398d10..bba0b6d48f050 100644 --- a/docs/src/main/asciidoc/deploying-to-google-cloud.adoc +++ b/docs/src/main/asciidoc/deploying-to-google-cloud.adoc @@ -67,17 +67,17 @@ runtime: java11 This will create a default service for your App Engine application. -Then, you can choose to build the application by yourself or letting `gcloud` or the Google Cloud Maven plugin build it for you. - -=== Building the application manually - -Set up your application to be packaged as an uber-jar via your `application.properties` file: +App Engine Standard does not support the default Quarkus' specific packaging layout, therefore, you must set up your application to be packaged as an uber-jar via your `application.properties` file: [source, properties] ---- quarkus.package.type=uber-jar ---- +Then, you can choose to build the application manually or delegating that responsibility to `gcloud` or the Google Cloud Maven plugin. + +=== Building the application manually + Use Maven to build the application using `mvn clean package`, it will generate a single JAR that contains all the classes of your application including its dependencies. Finally, use `gcloud` to deploy your application as an App Engine service. @@ -89,23 +89,16 @@ gcloud app deploy target/getting-started-1.0.0-SNAPSHOT-runner.jar This command will upload your application jar and launch it on App Engine. -When done, the output will display the URL of your application (target url), you can use it with curl or directly open it in your browser using `gcloud app browse`. +When it’s done, the output will display the URL of your application (target url), you can use it with curl or directly open it in your browser using `gcloud app browse`. === Building the application via gcloud You can choose to let `gcloud` build your application for you, this is the simplest way to deploy to App Engine. -In this case, you need to configure your application to be packaged as an uber-jar in your `application.properties` file: - -[source, properties] ----- -quarkus.package.type=uber-jar ----- - Then, you can just launch `gcloud app deploy` in the root of your project, it will upload all your project files (the list can be reduced via the `.gcloudignore` file), package your JAR via Maven (or Gradle) and launch it on App Engine. -When done, the output will display the URL of your application (target url), you can use it with curl or directly open it in your browser using `gcloud app browse`. +When it’s done, the output will display the URL of your application (target url), you can use it with curl or directly open it in your browser using `gcloud app browse`. === Building the application via the Google Cloud Maven plugin @@ -122,7 +115,7 @@ First, add the plugin to your `pom.xml`: GCLOUD_CONFIG <1> gettingstarted - ${project.build.directory}/quarkus-app/quarkus-run.jar <2> + ${project.build.directory}/${project.artifactId}-${project.version}-runner.jar <2> ----