Skip to content

Commit 04d5e7f

Browse files
committed
edits
1 parent fcd412c commit 04d5e7f

File tree

4 files changed

+71
-82
lines changed

4 files changed

+71
-82
lines changed

articles/app-service/includes/quickstart-java/quickstart-java-javase.md

Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,16 @@ ms.date: 06/10/2025
77
ms.author: cephalin
88
---
99

10-
[Azure App Service](/azure/app-service/) provides a highly scalable, self-patching web app hosting service. At the top of the page, choose how you want to deploy your Java app: **Java SE**, **Tomcat**, or **JBoss EAP**, and then follow the corresponding instructions.
11-
12-
In this quickstart, you use the [Maven Plugin for Azure App Service Web Apps](https://github.com/microsoft/azure-maven-plugins/blob/develop/azure-webapp-maven-plugin/README.md) to deploy a Java web application with an embedded Spring Boot, Quarkus, or Tomcat server to App Service. For more information, see [azure-webapp-maven-plugin](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Web-App).
13-
14-
If Maven isn't your preferred development tool, check out our other similar tutorials for Java developers:
15-
+ [Gradle](../../configure-language-java-deploy-run.md?pivots=platform-linux#gradle)
16-
+ [IntelliJ IDEA](/azure/developer/java/toolkit-for-intellij/create-hello-world-web-app)
17-
+ [Eclipse](/azure/developer/java/toolkit-for-eclipse/create-hello-world-web-app)
18-
+ [Visual Studio Code](https://code.visualstudio.com/docs/java/java-webapp)
10+
In this quickstart, you use the Maven plugin to deploy a Java web application with an embedded Spring Boot, Quarkus, or Tomcat server to App Service by using the [azure-webapp-maven-plugin](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Web-App).
1911

2012
## Prerequisites
2113

2214
- [!INCLUDE [quickstarts-free-trial-note](~/reusable-content/ce-skilling/azure/includes/quickstarts-free-trial-note.md)]
2315

24-
- Run the Azure CLI and Maven commands in this tutorial by using Azure Cloud Shell, an interactive shell that you can use through your browser to work with Azure services.
16+
- Run the commands in this quickstart by using Azure Cloud Shell, an interactive shell that you can use through your browser to work with Azure services. To use Cloud Shell:
2517

26-
To use Cloud Shell, select **Open Cloud Shell** at upper right in a code block and sign in to Azure if necessary. Then select **Copy** in the code block, paste the code into Cloud Shell, and run it. Make sure you're using the **Bash** environment of Cloud Shell.
18+
1. Select **Open Cloud Shell** at upper right in a code block and sign in to Azure if necessary. Make sure you're in the **Bash** environment of Cloud Shell.
19+
1. Select **Copy** in the code block, paste the code into Cloud Shell, and run it.
2720

2821
## Get the sample app
2922

@@ -68,9 +61,9 @@ Then change your working directory to the project folder by running `cd my-webap
6861

6962
## Configure the Maven plugin
7063

71-
The deployment process to Azure App Service uses your Azure credentials from Azure Cloud Shell automatically. If the Azure CLI isn't installed locally, then the Maven plugin authenticates with OAuth or device sign-in. For more information, see [authentication with Maven plugins](https://github.com/microsoft/azure-maven-plugins/wiki/Authentication).
64+
The App Service deployment process uses your Azure credentials from Cloud Shell automatically. The Maven plugin authenticates with OAuth or device sign-in. For more information, see [Authentication](https://github.com/microsoft/azure-maven-plugins/wiki/Authentication).
7265

73-
Run the Maven command shown next to configure the deployment. This command helps you to set the App Service operating system and Java version.
66+
Run the following Maven command to configure the deployment by setting the App Service operating system and Java version.
7467

7568
```azurecli-interactive
7669
mvn com.microsoft.azure:azure-webapp-maven-plugin:2.14.1:config
@@ -117,8 +110,8 @@ The relevant portion of the *pom.xml* file should look similar to the following
117110
<version>x.xx.x</version>
118111
<configuration>
119112
<schemaVersion>v2</schemaVersion>
120-
<resourceGroup>your-resource-group-name</resourceGroup>
121-
<appName>your-app-name</appName>
113+
<resourceGroup>generated-app-name-rg</resourceGroup>
114+
<appName>generated-app-name/appName>
122115
...
123116
</configuration>
124117
</plugin>
@@ -138,25 +131,25 @@ You can modify the configurations for App Service directly in your *pom.xml* fil
138131
With all the configuration ready in your [pom.xml](https://github.com/Azure-Samples/java-docs-embedded-tomcat/blob/main/pom.xml) file, you can deploy your Java app to Azure.
139132

140133
1. Build the JAR file using the following command.
141-
134+
142135
### [Spring Boot](#tab/springboot)
143136

144137
```bash
145138
mvn clean package
146139
```
147-
140+
148141
> [!TIP]
149142
> Spring Boot produces two JAR files with `mvn package`, but the `azure-webapp-maven-plugin` picks the right JAR file to deploy automatically.
150-
143+
151144
### [Quarkus](#tab/quarkus)
152-
145+
153146
```bash
154147
echo '%prod.quarkus.http.port=${PORT}' >> src/main/resources/application.properties
155148
mvn clean package -Dquarkus.package.jar.type=uber-jar
156149
```
157-
150+
158151
Set the Quarkus port in the *application.properties* file to the `PORT` environment variable in the Linux Java container. `Dquarkus.package.jar.type=uber-jar` tells Maven to [generate an Uber-Jar](https://quarkus.io/guides/maven-tooling#uber-jar-maven), which includes all dependencies in the JAR file.
159-
152+
160153
> [!TIP]
161154
> Quarkus produces two JAR files with `mvn package`, but `azure-webapp-maven-plugin` picks the right JAR file to deploy automatically.
162155
@@ -165,23 +158,23 @@ With all the configuration ready in your [pom.xml](https://github.com/Azure-Samp
165158
```bash
166159
mvn clean package
167160
```
168-
169-
To make the application deploy using [azure-webapp-maven-plugin](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Web-App) and run on Azure App Service, the sample configures the `package` goal as follows:
161+
162+
To make the application deploy using the [azure-webapp-maven-plugin](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Web-App) and run on Azure App Service, the sample configures the `package` goal as follows:
170163

171164
- Builds a single uber JAR file, which contains everything the application needs to run.
172165
- Creates an [executable JAR](https://en.wikipedia.org/wiki/JAR_(file_format)#Executable_JAR_files) by specifying the Tomcat class as the startup class.
173166
- Replaces the original artifact with the `Uber-Jar` to ensure that the deploy step deploys the right file.
174-
167+
175168
-----
176-
169+
177170
1. Deploy the app to Azure by using the following command:
178-
171+
179172
```bash
180173
mvn azure-webapp:deploy
181174
```
182-
175+
183176
Once you select from a list of available subscriptions, Maven deploys to Azure App Service. When deployment completes, your application is ready, and you see the following output:
184-
177+
185178
```output
186179
[INFO] Successfully deployed the artifact to <URL>
187180
[INFO] ------------------------------------------------------------------------
@@ -191,27 +184,27 @@ With all the configuration ready in your [pom.xml](https://github.com/Azure-Samp
191184
[INFO] Finished at: 2023-07-26T12:47:50Z
192185
[INFO] ------------------------------------------------------------------------
193186
```
194-
187+
195188
1. Open the app as follows:
196-
189+
197190
### [Spring Boot](#tab/springboot)
198-
191+
199192
Open your app's default domain from the **Overview** page in the Azure portal, and append `/greeting` to the URL. You should see the following app:
200-
193+
201194
:::image type="content" source="../../media/quickstart-java/springboot-hello-world-in-browser-azure-app-service.png" alt-text="Screenshot of Spring Boot Hello World web app running in Azure App Service.":::
202-
195+
203196
### [Quarkus](#tab/quarkus)
204-
197+
205198
Open your app's default domain from the **Overview** in the Azure portal, and append `/hello` to the URL. You should see the following app:
206-
199+
207200
:::image type="content" source="../../media/quickstart-java/quarkus-hello-world-in-browser-azure-app-service.png" alt-text="Screenshot of Quarkus web app running in Azure App Service.":::
208-
201+
209202
### [Embedded Tomcat](#tab/embeddedtomcat)
210-
203+
211204
Open the URL for your app's default domain from the **Overview** in the Azure portal. You should see the following app:
212-
205+
213206
:::image type="content" source="../../media/quickstart-java/embedded-tomcat-hello-world-in-browser-azure-app-service.png" alt-text="Screenshot of embedded Tomcat web app running in Azure App Service.":::
214-
207+
215208
-----
216209

217210
Congratulations! You deployed a Java app to App Service.
@@ -221,8 +214,8 @@ Congratulations! You deployed a Java app to App Service.
221214
You created the resources for this tutorial in an Azure resource group. If you no longer need them, you can delete the resource group and all its resources by running the following Azure CLI command in the Cloud Shell.
222215

223216
```azurecli-interactive
224-
az group delete --name <your resource group name> --yes
217+
az group delete --name <resource group name> --yes
225218
```
226219

227-
For example, run `az group delete --name quarkus-hello-azure-1690375364238-rg --yes`. This command might take awhile to run.
220+
For example, run `az group delete --name quarkus-hello-azure-1690375364238-rg --yes`. This command might take a while to run.
228221

articles/app-service/includes/quickstart-java/quickstart-java-jboss.md

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,16 @@ ms.date: 06/10/2025
77
ms.author: cephalin
88
---
99

10-
[Azure App Service](/azure/app-service/) provides a highly scalable, self-patching web app hosting service. At the top of the page, choose how you want to deploy your Java app: **Java SE**, **Tomcat**, or **JBoss EAP**, and then follow the corresponding instructions.
11-
12-
In this quickstart, you use the [Maven Plugin for Azure App Service Web Apps](https://github.com/microsoft/azure-maven-plugins/blob/develop/azure-webapp-maven-plugin/README.md) to deploy a Java web application to a Linux JBoss EAP server in App Service.
13-
14-
If Maven isn't your preferred development tool, check out our similar tutorials for Java developers:
15-
+ [Gradle](../../configure-language-java-deploy-run.md?pivots=platform-linux#gradle)
16-
+ [IntelliJ IDEA](/azure/developer/java/toolkit-for-intellij/create-hello-world-web-app)
17-
+ [Eclipse](/azure/developer/java/toolkit-for-eclipse/create-hello-world-web-app)
18-
+ [Visual Studio Code](https://code.visualstudio.com/docs/java/java-webapp)
10+
This quickstart uses the Maven plugin to deploy a Java web application to a Linux JBoss EAP server in App Service.
1911

2012
## Prerequisites
2113

2214
- [!INCLUDE [quickstarts-free-trial-note](~/reusable-content/ce-skilling/azure/includes/quickstarts-free-trial-note.md)]
2315

24-
- Run the Azure CLI and Maven commands in this tutorial by using Azure Cloud Shell, an interactive shell that you can use through your browser to work with Azure services.
16+
- Run the commands in this quickstart by using Azure Cloud Shell, an interactive shell that you can use through your browser to work with Azure services. To use Cloud Shell:
2517

26-
To use Cloud Shell, select **Open Cloud Shell** at upper right in a code block and sign in to Azure if necessary. Then select **Copy** in the code block, paste the code into Cloud Shell, and run it. Make sure you're using the **Bash** environment of Cloud Shell.
18+
1. Select **Open Cloud Shell** at upper right in a code block and sign in to Azure if necessary. Make sure you're in the **Bash** environment of Cloud Shell.
19+
1. Select **Copy** in the code block, paste the code into Cloud Shell, and run it.
2720

2821
## Create a Java app
2922

@@ -42,14 +35,14 @@ If Maven isn't your preferred development tool, check out our similar tutorials
4235
mvn clean install
4336
```
4437

38+
If you see a message about being in detached HEAD state, you can ignore it. You don't make any Git commit in this quickstart, so detached HEAD state is appropriate.
39+
4540
> [!TIP]
46-
> The `petstore-ee7` sample requires Java 11 or newer. The `booty-duke-app-service` sample project requires Java 17. If your installed version of Java is less than 17, run the build from within the *petstore-ee7* directory, rather than at the top level.
47-
48-
If you see a message about being in detached HEAD state, you can ignore it. You won't make any Git commit in this quickstart, so detached HEAD state is appropriate.
41+
> The `petstore-ee7` sample requires Java 11 or newer. The `booty-duke-app-service` sample project requires Java 17. If your installed version of Java is less than 17, run the build from within the *petstore-ee7* directory instead of at the top level.
4942
5043
## Configure the Maven plugin
5144

52-
The App Service deployment process uses your Azure credentials from Azure Cloud Shell automatically. The Maven plugin authenticates with OAuth or device sign-in. For more information, see [Authentication](https://github.com/microsoft/azure-maven-plugins/wiki/Authentication).
45+
The App Service deployment process uses your Azure credentials from Cloud Shell automatically. The Maven plugin authenticates with OAuth or device sign-in. For more information, see [Authentication](https://github.com/microsoft/azure-maven-plugins/wiki/Authentication).
5346

5447
Run the following Maven command to configure the deployment by setting the App Service operating system, Java version, and Jbosseap version.
5548

@@ -99,16 +92,16 @@ The relevant portion of the *pom.xml* file should look similar to the following
9992
<version>x.xx.x</version>
10093
<configuration>
10194
<schemaVersion>v2</schemaVersion>
102-
<resourceGroup>your-resource-group-name</resourceGroup>
103-
<appName>your-app-name</appName>
95+
<resourceGroup>petstoreee7-1745409173307-rg</resourceGroup>
96+
<appName>petstoreee7-1745409173307</appName>
10497
...
10598
</configuration>
10699
</plugin>
107100
</plugins>
108101
</build>
109102
```
110103

111-
The values for `<appName>` and `<resourceGroup>`, `petstoreee7-1745409173307` and `petstoreee7-1745409173307-rg` in the demo code, are used later.
104+
The values for `<appName>` and `<resourceGroup>`, `petstoreee7-1745409173307` and `petstoreee7-1745409173307-rg` in the demo app, are used later.
112105

113106
You can modify the configurations for App Service directly in your *pom.xml* file.
114107

@@ -124,7 +117,9 @@ With all the configuration ready in your *pom.xml* file, you can deploy your Jav
124117
mvn package azure-webapp:deploy -DskipTests
125118
```
126119

127-
Once you select from a list of available subscriptions, Maven deploys to Azure App Service. When deployment completes, your application is ready. For this demo, the URL is `http://petstoreee7-1745409173307.azurewebsites.net`. When you open the URL with your local web browser, you should see the following app:
120+
Once you select from a list of available subscriptions, Maven deploys to Azure App Service. When deployment completes, your application is ready.
121+
122+
For this demo app, the URL is `http://petstoreee7-1745409173307.azurewebsites.net`. When you open the URL with your local web browser, you should see the following app:
128123

129124
![Screenshot of Maven Hello World web app running in Azure App Service.](../../media/quickstart-java/jboss-sample-in-app-service.png)
130125

@@ -135,7 +130,6 @@ Congratulations! You deployed a Java app to App Service.
135130
You created the resources for this tutorial in an Azure resource group. If you no longer need them, you can delete the resource group and all its resources by running the following Azure CLI command in the Cloud Shell.
136131

137132
```azurecli-interactive
138-
az group delete --name <your resource group name> --yes
133+
az group delete --name petstoreee7-1745409173307-rg --yes
139134
```
140-
141-
For example, to delete the demo resources, run `az group delete --name petstoreee7-1745409173307-rg --yes`. This command might take awhile to run.
135+
The command might take a while to run.

0 commit comments

Comments
 (0)