Search code examples
javaazureazure-web-app-serviceredhatjboss7.x

Unable to deploy EAR file to Azure App Service using JBOSS EAP 7


I am unable to deploy EAR file into Azure App Service with JBOSS EAP 7.3.6.

I tried following steps as described in the documentation found at this link.

Out of given 4 options, allowed to use either Azure CLI or Kudu API since EAR is not supported by Azure Powershell and Kudu UI not supporting any.

  1. Using Azure CLI, tried executing following command.,

    az webapp deploy --resource-group test-rg --name dmap --src-path C:\Users\HP\Desktop\DMAP.ear

    Getting error as

    CommandNotFoundError: 'deploy' is misspelled or not recognized by the system. Did you mean 'deployment' ? Still stuck? Run 'az webapp --help' to view all commands or go to 'https://learn.microsoft.com/en-us/cli/azure/reference-index?view=azure-cli-latest' to learn more

  2. Using Kudu API, tried executing following command.,

    curl -X POST -u dmap --data-binary @"C:\Users\HP\Desktop\DMAP.ear" https://dmap.scm.azurewebsites.net/api/publish&type=ear

    Getting response as

    The system cannot find the file specified.

    Searching for this response, I found this link where it comes for successful deployment too. Assuming it I tried to access my application using link https://dmap.azurewebsites.net/DMAPWeb. But it shows nothing found.

    To verify the deployment, I checked folder /site/wwwroot using FTP but I don't see any files deployed.

Could you please guide me here and clarify where I am wrong.


Solution

  • We have tested this in our local environment it is working fine. Below statements are based on our analysis.

    Using the Below Azure CLI cmdlet , we have tried deploying the .ear file from local machine to web app (deployed in azure ) operation got succeeded without any issues.

    Here is the cmdlet we have used :

    az webapp deploy --resource-group <rgName> --name <webAppName> --src-path c:\Users\Downloads\<fileName>.ear ##Path of .ear file 
    

    Here is the Sample output for reference:

    enter image description here

    Note: If you are deploying from local machine run the az.cmd(AzureCLI) in admin mode. By default az.cmd will be under the path c:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin in your local machine.