question

ZamRiaz-4605 avatar image
0 Votes"
ZamRiaz-4605 asked JoaquinVano commented

Azure App Service: deploying java resource

Hi,

I'm using Azure's maven plugin to deploy my Java project to Azure app service. My project includes one excel file as a resource. This excel file is properly referenced inside my .pom file and when I run maven's package command to deploy the project to Azure, the command returns success for both the .jar file and the excel resource file.

Problem is while the app runs successfully, it is unable to find the excel file. I also tried to manually login to the default local storage assigned for my app service, and it doesn't show the Excel file anywhere. My question is where are both .jar and .xlsx files being copied in Azure app service and is there a way that I could have the .xlsx file deployed to default local storage, let's say, in home directory???

Best Regards

azure-webappsazure-webapps-content-deployment
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ZamRiaz-4605, is your java app deployed to Windows app service or Linux app service?

0 Votes 0 ·

1 Answer

JoaquinVano avatar image
0 Votes"
JoaquinVano answered JoaquinVano commented

First, I suggest you to test running the App locally to see if it works as expected and then deploy it to Azure App Service. If it works locally and not in App Service, please open a support ticket in Azure and we can better assist you finding out what's going on.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi I got the same problem. I am using Azure pipeline to deploy my Maven project. I was able to deploy my website successfully, when all the functionalities did not work at all but it works fine when I run it locally. Do you any suggestion on this?

Thank you!

0 Votes 0 ·

Are you also accessing a file inside your site contents @Student-6261 or you have basic hello world app that doesn't run?

0 Votes 0 ·

Hi

Please try first our quickstart:
https://docs.microsoft.com/en-us/azure/app-service/quickstart-java

It uses maven to deploy, so you can try the following command:
mvn package azure-webapp:deploy

Then you can automate this with Azure DevOps pipelines.

I hope this info to be useful!

Joaquín

0 Votes 0 ·