I have this step in the deployment yaml file.
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
slot-name: 'production'
publish-profile: ${{ secrets.DEV_AZ_PUBLISH_PROFILE_SPRING_DAPI }}
package: '*.jar'
When it builds, the jar name under ‘target’ directory is spring-v2.11.jar and deploys to the Azure App Service under ‘C:homesitewwwroot’, but the jar name is renamed to ‘app.jar’.
Is there a way to use the original jar name built from the Github Action? It seems that something must intercept this jar name and renames to app.jar.
This is my web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
</handlers>
<httpPlatform processPath="%JAVA_HOME%binjava.exe"
arguments="-Djava.net.preferIPv4Stack=true -Xms1G -Xmx2G -Dserver.port=%HTTP_PLATFORM_PORT% -jar "%HOME%sitewwwrootspring-v2.11.jar"">
</httpPlatform>
</system.webServer>
</configuration>
Because of the renamed jar name, deployment fails. It works if i change to app.jar, but is there a way to make this web.config more flexible which means it can accept the latest jar file and restart the app service? Not sure if it is doable.
Thanks.