This example assumes you have previously completed the following examples:
mvn clean install
Setup the application name environment variable using the command line below:
export APPSERVICE_TOMCAT_HELLOWORLD=appservice-tomcat-helloworld-$RANDOM
To deploy the example use the following Maven command line:
mvn azure-webapp:deploy \
-DappName=$APPSERVICE_TOMCAT_HELLOWORLD \
-DappServicePlan=$APPSERVICE_PLAN \
-DresourceGroup=$RESOURCE_GROUP
Once the command completes you will be able to see the example by using your
web browser and going to the xxxxx.azurewebsites.net
address the command
echoes.
You can also get the URL using the following command:
az webapp show \
--name $APPSERVICE_TOMCAT_HELLOWORLD \
--resource-group $RESOURCE_GROUP \
--query defaultHostName \
--output tsv
The example supports the following properties that you can pass in as
-Dname=value
to the Maven command line to customize your deployment.
name | description |
---|---|
appName |
the Application Name |
appServicePlan |
the App Service plan to use |
javaVersion |
the Java version to use |
region |
the Region to use |
resourceGroup |
the Resource Group to use |
webContainer |
the Web Container to use |
Do NOT forget to remove the resources once you are done running the example.