Check the following information on the console etc.
appName <-(1) in the figure resourceGroup <-(2) in the figure subscriptionId <-(3) in the figure
pom.xml
Set the build part as follows. Change the region runtime etc. as appropriate according to the server side environment.
<build>
<!-- https://docs.microsoft.com/en-us/azure/app-service/app-service-web-get-started-java -->
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!--************************************************* -->
<!-- Deploy to Tomcat in App Service Windows -->
<!--************************************************* -->
<plugin>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-webapp-maven-plugin</artifactId>
<version>1.7.0</version>
<configuration>
<!-- Specify v2 schema -->
<schemaVersion>v2</schemaVersion>
<!-- App information -->
<!-- SUBSCRIPTION_ID Unique ID for the subscription that deploys the app-->
<subscriptionId>your_subscriptionId</subscriptionId>
<!-- RESOURCEGROUP_NAME -->
<resourceGroup>your_resourceGroup</resourceGroup>
<!-- WEBAPP_NAME -->
<appName>your_appName</appName>
<!-- REGION -->
<region>your_region</region>
<!-- Java Runtime Stack for App Service on Windows -->
<runtime>
<os>windows</os>
<javaVersion>1.8</javaVersion>
<webContainer>tomcat 9.0</webContainer>
</runtime>
<deployment>
<resources>
<resource>
<directory>${project.basedir}/target</directory>
<includes>
<include>*.war</include>
</includes>
</resource>
</resources>
</deployment>
</configuration>
</plugin>
</plugins>
</build>
Log in from the console
az login
Move to the pom.xml directory and execute the command as shown below. Change the options to your liking.
mvn clean package azure-webapp:deploy -Dmaven.test.skip=true
Quickstart: Create a Java app on Azure App Service - Azure App Service | Microsoft Docs https://docs.microsoft.com/en-us/azure/app-service/quickstart-java?tabs=javase&pivots=platform-linux
that's all.
Recommended Posts