Skip to content

Deploy using azure maven webapp plugin causes multiple deployments and 409 #2522

@Mds1025

Description

@Mds1025

Hello, we updated a Java 8 application to Java 17, and we used azure-webapp-maven-plugin. With java 17 version, we updated also the azure plugin and after that we cannot deploy because we have a 409 error.
Our project structure:
We have a maven multimodule project, so at the end we have an app.jar with some classes and a lot of jar libs (like 200 jars) that are in the same folder of app.jar
With older version, the deploy was pretty fast, all files were uploaded on wwwroot folder in 2-3 minutes.

Problem
After update to azure webapp maven plugin to 2.13.0, it starts to deploy every single jar like a separate deployment. We see on deployment center a lot of lines of deploys (in the previous version it was only one line for all deployment), and after some file uploaded, we receive this error:

[�[1;31mERROR�[m] Failed to execute goal �[32mcom.microsoft.azure:azure-webapp-maven-plugin:2.13.0:deploy�[m �[1m(default-cli)�[m on project �[36mmilleweb-fhir-srv�[m: �[1;31mdeploy to Azure Web App with resource creation or updating�[m: AzureToolkitRuntimeException: deploy to Azure Web App(millefhir-dev) with resource creation or updating: Status code 409, "The 'Preparing zip package' operation conflicts with the pending 'Performing continuous deployment' operation started at 2025-01-08T11:01:35.7240777Z. Please retry operation later.": Unsupported text Content-Type Type: class java.lang.Object -> �[1m[Help 1]�[m

Actual pom:
<plugin> <groupId>com.microsoft.azure</groupId> <artifactId>azure-webapp-maven-plugin</artifactId> <version>2.13.0</version> <configuration> <subscriptionId>${azure.subscriptionid}</subscriptionId> <schemaVersion>${azure.schemaVersion}</schemaVersion> <resourceGroup>${azure.resourceGroup}</resourceGroup> <appName>${azure.appName}</appName> <region>${azure.region}</region> <auth> <client>****HIDDEN*****</client> <tenant>****HIDDEN*****</tenant> <key>****HIDDEN*****</key> <environment>AZURE</environment> </auth> <runtime> <os>${azure.os}</os> <javaVersion>${azure.javaVersion}</javaVersion> <webContainer>${azure.webContainer}</webContainer> </runtime> <appSettings> <property> <name>WEBSITE_TIME_ZONE</name> <value>W. Europe Standard Time</value> </property> <property> <name>configDir</name> <value>D:/home/site/wwwroot/</value> </property> </appSettings> <!-- End of App Settings --> <deployment> <resources> <resource> <type>jar</type> <directory>${project.basedir}/target</directory> <includes> <include>app.jar</include> </includes> </resource> <resource> <type>lib</type> <directory>${project.basedir}/target</directory> <includes> <include>*.jar</include> </includes> </resource> <resource> <directory>${project.basedir}/azure</directory> <includes> <include>web.config</include> <include>ds_jwt_public.pkcs8</include> </includes> </resource> <resource> <directory>${project.basedir}/${logback.environment}</directory> <includes> <include>logback.xml</include> </includes> </resource> </resources> </deployment> </configuration> </plugin>

I tried to use Type attribute but is not working.
For each jar we have something like that line:
[�[1;34mINFO�[m] Deploying (�[36mC:\progetti\milleweb-fhir\milleweb-fhir-srv\target\axis-1.4.jar�[m)[�[36mlib�[m] �[36m to axis-1.4.jar�[m ...

Thank you

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions