You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deploy process to Azure App Service uses account credentials from the Azure CLI. [Sign in with the Azure CLI](/cli/azure/authenticate-azure-cli?view=azure-cli-latest) before continuing.
92
67
93
-
> [!NOTE]
94
-
> In this article we are only working with Java apps packaged in WAR files. The plugin also supports JAR web applications, visit [Deploy a Java SE JAR file to App Service on Linux](https://docs.microsoft.com/java/azure/spring-framework/deploy-spring-boot-java-app-with-maven-plugin?toc=%2fazure%2fapp-service%2fcontainers%2ftoc.json) to try it out.
68
+
```azurecli
69
+
az login
70
+
```
95
71
72
+
Then you can configure the deployment, run the maven command `mvn azure-webapp:config` in the Command Prompt and use the default configurations by pressing **ENTER** until you get the **Confirm (Y/N)** prompt, then press **'y'** and the configuration is done.
[WARNING] The plugin may not work if you change the os of an existing webapp.
84
+
Define value for OS(Default: Linux):
85
+
1. linux [*]
86
+
2. windows
87
+
3. docker
88
+
Enter index to use:
89
+
Define value for javaVersion(Default: jre8):
90
+
1. jre8 [*]
91
+
2. java11
92
+
Enter index to use:
93
+
Define value for runtimeStack(Default: TOMCAT 8.5):
94
+
1. TOMCAT 9.0
95
+
2. jre8
96
+
3. TOMCAT 8.5 [*]
97
+
4. WILDFLY 14
98
+
Enter index to use:
99
+
Please confirm webapp properties
100
+
AppName : helloworld-1558400876966
101
+
ResourceGroup : helloworld-1558400876966-rg
102
+
Region : westeurope
103
+
PricingTier : Premium_P1V2
104
+
OS : Linux
105
+
RuntimeStack : TOMCAT 8.5-jre8
106
+
Deploy to slot : false
107
+
Confirm (Y/N)? : Y
108
+
```
109
+
110
+
> [!NOTE]
111
+
> In this article we are only working with Java apps packaged in WAR files. The plugin also supports JAR web applications, visit [Deploy a Java SE JAR file to App Service on Linux](https://docs.microsoft.com/java/azure/spring-framework/deploy-spring-boot-java-app-with-maven-plugin?toc=%2fazure%2fapp-service%2fcontainers%2ftoc.json) to try it out.
96
112
97
-
Update the following placeholders in the plugin configuration:
113
+
Navigate to `pom.xml` again to see the plugin configuration is updated, You can modify other configurations for App Service directly in your pom file if needed, some common ones are listed below:
98
114
99
-
| Placeholder | Description |
100
-
| ----------- | ----------- |
101
-
|`SUBSCRIPTION_ID`| The unique ID of the subscription you want to deploy your app to. Default subscription's ID can be found from the Cloud Shell or CLI using the `az account show` command. For all the available subscriptions, use the `az account list` command.|
102
-
|`RESOURCEGROUP_NAME`| Name for the new resource group in which to create your app. By putting all the resources for an app in a group, you can manage them together. For example, deleting the resource group would delete all resources associated with the app. Update this value with a unique new resource group name, for example, *TestResources*. You will use this resource group name to clean up all Azure resources in a later section. |
103
-
|`WEBAPP_NAME`| The app name will be part the host name for the app when deployed to Azure (WEBAPP_NAME.azurewebsites.net). Update this value with a unique name for the new App Service app, which will host your Java app, for example *contoso*. |
104
-
|`REGION`| An Azure region where the app is hosted, for example `westus2`. You can get a list of regions from the Cloud Shell or CLI using the `az account list-locations` command. |
115
+
Property | Required | Description | Version
116
+
---|---|---|---
117
+
`<schemaVersion>` | false | Specify the version of the configuration schema. Supported values are: `v1`, `v2`. | 1.5.2
118
+
`<resourceGroup>` | true | Azure Resource Group for your Web App. | 0.1.0+
119
+
`<appName>` | true | The name of your Web App. | 0.1.0+
120
+
[`<region>`](/java/api/overview/azure/maven/azure-webapp-maven-plugin/readme#region) | true | Specifies the region where your Web App will be hosted; the default value is **westus**. All valid regions at [Supported Regions](/java/api/overview/azure/maven/azure-webapp-maven-plugin/readme#region) section. | 0.1.0+
121
+
[`<pricingTier>`](/java/api/overview/azure/maven/azure-webapp-maven-plugin/readme##pricingtier) | false | The pricing tier for your Web App. The default value is **P1V2**.| 0.1.0+
122
+
[`<runtime>`](/java/api/overview/azure/maven/azure-webapp-maven-plugin/readme#runtimesetting) | true | The runtime environment configuration, you could see the detail [here](/java/api/overview/azure/maven/azure-webapp-maven-plugin/readme#runtimesetting). | 0.1.0+
123
+
[`<deployment>`](/java/api/overview/azure/maven/azure-webapp-maven-plugin/readme#deploymentsetting) | true | The deployment configuration, you could see the details [here](/java/api/overview/azure/maven/azure-webapp-maven-plugin/readme#deploymentsetting). | 0.1.0+
Once deployment has completed, browse to the deployed application using the following URL in your web browser, for example `http://<webapp>.azurewebsites.net`.
115
134
116
-

135
+

117
136
118
137
**Congratulations!** You've deployed your first Java app to App Service on Linux.
In the preceding steps, you created Azure resources in a resource group. If you don't expect to need these resources in the future, delete the resource group by running the following command in the Cloud Shell:
142
+
143
+
```azurecli-interactive
144
+
az group delete --name <your resource group name; for example: helloworld-1558400876966-rg> --yes
0 commit comments