I’m trying to deploy a Spring Boot application to Microsoft Azure Spring Apps using Maven.
I strictly followed this tutorial from Microsoft : https://learn.microsoft.com/en-us/azure/spring-apps/how-to-maven-deploy-apps , except for the azure-spring-apps-maven-plugin which had to be upgraded from 1.10.0 to 1.17.0, as per follows :
mvn com.microsoft.azure:azure-spring-apps-maven-plugin:1.17.0:config
But when running the deploy command with the sample project :
mvn azure-spring-apps:deploy
The following "Invalid arguments: DeploymentSettings must be provided" error occurs :
[ERROR] Operator called default onErrorDropped
reactor.core.Exceptions$StaticThrowable: Operator has been terminated
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.680 s
[INFO] Finished at: 2023-05-02T19:06:23+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.microsoft.azure:azure-spring-apps-maven-plugin:1.17.0:deploy (default-cli) on project hellospring: create or update Spring app(hellospring) from config: AzureToolkitRuntimeException: create Azure Spring App deployment (default): Status code 400, "{"error":{"code":"BadArgument","message":"Invalid arguments: DeploymentSettings must be provided.","details":[{"code":"BadArgument","message":"DeploymentSettings must be provided.","target":"Properties.DeploymentSettings"}]}}" -> [Help 1]
The HelloSpring sample application does not require any specific configuration (no database, no file storage, no https certificates, etc.).
Any idea of what I may be doing wrong ?
Thanks a lot for your help
2
Answers
I would suggest you to run
mvn clean install
before deploying your application to Azure Spring Apps.And also Check if the below configuration is being added in your pom.xml file after running
mvn com.microsoft.azure:azure-spring-apps-maven-plugin:1.17.0:config
.I have created a spring boot application and deployed to Azure Spring Apps:
mvn com.microsoft.azure:azure-spring-apps-maven-plugin:1.17.0:config
command.This will ask to select the subscription, Resource group, Azure Spring Apps name, Java runtime version etc., and then generate the configurations required for deployment.
I was also getting errors initially and couldn’t deploy the application.
But, after running the command
mvn clean install
, I was able to deploy the application to spring apps.Deploying the application to Azure Spring Apps:
Portal:
Response:
Same issue here. Tried all of the above and still get the same error (using plugin 1.17)
One thing I did notice is that everything works perfectly if you are not using the "Standard Consumption" plan. If you use at least "Basic" everything works as it should. I have retested this a few times and each time it works fine with "Basic" but not "Consumption"
Obviously this is not ideal, perhaps there is update coming soon?
Last thing I tried was to reinstall the Azure CLI extension "for the Azure Spring Apps Standard consumption plan" as described in this tutorial but still get same results.