Skip to main content Explore View all products (200+) Microsoft Foundry Azure Copilot GitHub Copilot Azure Kubernetes Service (AKS) Azure Cosmos DB Azure Database for PostgreSQL Azure Arc Microsoft Fabric Linux virtual machines in Azure Foundry Models Foundry Agent Service Foundry IQ Foundry Tools Foundry Control Plane Observability in Foundry Control Plane Azure OpenAI in Foundry Models Azure Speech in Foundry Tools Azure Machine Learning View all databases Azure Cosmos DB Azure DocumentDB Azure SQL Azure Database for PostgreSQL Azure Managed Redis Microsoft Fabric Azure Databricks Linux virtual machines in Azure Windows Server on Azure Azure Functions Azure Virtual Machine Scale Sets Azure API Management Azure Container Apps Azure Kubernetes Service (AKS) Azure Kubernetes Fleet Manager Azure Container Registry Azure Red Hat OpenShift Azure Container Instances Azure Container Storage Azure Arc Azure Local Microsoft Defender for Cloud Azure Monitor Microsoft Sentinel Azure Migrate View all solutions (40+) Cloud solutions for small and medium businesses Cloud migration and modernization center Data analytics for AI Azure Databases AI apps and agents Microsoft Marketplace Microsoft Sovereign Cloud AI apps and agents Responsible AI with Azure AI Infrastructure Data analytics for AI Machine learning operations (MLOps) Low-code application development on Azure Integration Services Serverless computing DevOps Migration and modernization center .NET apps migration Databases on Azure Linux on Azure Oracle on Azure SAP on the Microsoft Cloud Adaptive cloud High-performance computing (HPC) Infrastructure as a service (IaaS) Resiliency Azure Essentials Frontier Accelerate for Azure FinOps on Azure Microsoft Marketplace Azure pricing overview Create an Azure account Free Azure services Flexible purchase options Pricing calculator FinOps on Azure Maximize ROI from AI Azure savings plans Azure reservations Azure Hybrid Benefit Virtual Machines Azure SQL Microsoft Foundry Microsoft Fabric Azure Kubernetes Service (AKS) Microsoft Defender for Cloud View more Software Development Companies Microsoft Marketplace Find a partner Resources for Azure partners Get started with Azure Customer stories Analyst reports, white papers, and e-books Videos Learn more about cloud computing Documentation Explore Azure portal Developer resources Quickstart templates Resources for startups Developer community Students Azure for partners Blog Events and Webinars Learn Support Contact Sales Get started with Azure Sign in

We are pleased to announce a new feature in the Maven Plugin for Azure App Service. The plugin provides seamless integration of Azure services into Maven projects. With only one step, you can deploy your WAR file to Azure Web Apps on Linux with the built-in running stack of Java 8 and Tomcat 8.5 or 9.0. By leveraging Maven, the Azure App Service plugin is portable and can be integrated with your IDEs and CI/CD pipelines easily.

Web apps with Tomcat on Linux

A couple of months ago, we announced the preview release of built-in support for Java 8 and Tomcat 8.5/9.0 on Web Apps on Linux. This allows developers to get their Java apps up and running on Azure in a managed environment, benefitting from auto-scaling and high availability.

Getting started with Maven

After creating a new Azure Web App, choose Linux for OS and Tomcat as stack. Save the information of this new Web App to configurate the Maven plugin. Open the pom.xml file and add the following settings in the <configuration> section.

   
   your-resource-group
   your-app-name
             
   
   tomcat 8.5-jre8
 
   
   war

More detailed configurations are available on GitHub.  

Run it

Open your command line tool and sign in with the Azure CLI 2.0. Type the following command and it will build the project to a .war file and deploy it to your Azure Web App automatically.

$ mvn clean package azure-webapp:deploy

Terminal

It’s done! You can now open a browser to the URL of your app to visit your Java website running on Azure.

Check out our project on GitHub and learn about advanced features of Maven plugin for Azure App Service.

Next steps

More information about building Java apps on Azure:

Feedback

Please share your feedback and ask questions to help us improve below or on GitHub.

WE ARE MICROSOFT

Explore Microsoft Foundry

The future of AI starts here. Envision your next great AI app with the latest technologies. Get started with Azure.