The latest Maven plugin for Azure Web Apps provides a brand new experience that enables you to deploy not only application artifacts such as JAR, WAR, and EAR files but also application dependencies like libraries, module definitions, and startup scripts -- using one single Maven Goal.
Why use it?
Starting from version 1.16.1, the Maven plugin for Azure Web Apps now supports deploying extra file types like JAR, WAR, EAR, libraries, app server module definitions, startup scripts, and more. This new experience gives you:
Simplicity: Infrastructure as Code (IaC) by defining everything in your pom.xml and applying changes to Azure with a single Maven deploy Goal. You can easily embed the process in your CI/CD and avoid context switching between multiple tools.
One single app restart: Many file changes require Web App restart in order to take effect. The Maven plugin will manage restart policy during the deployment for you so that, no matter how many files are deployed, the Maven plugin will trigger only one restart.
Fewer errors: The Maven plugin ensures files are deployed in the right location for Azure App Service. (For example, startup scripts can only take effect if they are deployed under "/home/site/scripts/".) Using this plugin can help you avoid many errors.
How to get started
The Maven plugin for Azure Web Apps greatly simplifies the development experience for Tomcat, Spring Boot, and JBoss EAP apps on Azure App Service. Starting from a Maven project, run the following config goal, follow the wizard to authenticate with Azure, and generate configurations in your pom.xml that are ready to deploy.
The above configuration includes only your build artifact. As demonstrated in the PetStore JBoss EAP sample app, you might need to upload a script containing extra steps to prepare the environment before running the artifact. Now, instead of uploading files to the Web App with FTP, deploying the WAR package, and triggering an app restart, you can simply add the configurations below in your pom.xml.