我的应用程序作为Eclipse动态项目在我的Windows笔记本电脑上工作得很好。
我使用Azure/Publish as Azure Web App将其部署到Azure Web Apps for Linux。
应用程序部署成功。
然而,有几个文件是特定于Eclipse环境的,需要将其更改为特定于Linux环境。
目前,我正在手动更改这些设置,在部署后使用WinSCP,然后重启Web App。有没有办法将特定于Linux环境的文件作为部署的一部分上载?
我的一个想法是使用maven script进行部署
<project>
...
<packaging>war</packaging>
...
<build>
<plugins>
<plugin>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-webapp-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<!-- Web App information -->
<resourceGroup>${RESOURCEGROUP_NAME}</resourceGroup>
<appName>${WEBAPP_NAME}</appName>
<!-- Deploy Web App to the existing App Service Plan -->
<appServicePlanResourceGroup>${PLAN_RESOURCEGROUP_NAME}</appServicePlanResourceGroup>
<appServicePlanName>${PLAN_NAME}</appServicePlanName>
<!-- Java Runtime Stack for Web App on Linux-->
<linuxRuntime>tomcat 8.5-jre8</linuxRuntime>
</configuration>
</plugin>
...
</plugins>
</build>
</project>但是我不知道如何在脚本中指定特定于eclipse的文件,而且我也不知道这是不是最好的方法。
发布于 2019-11-29 05:21:56
我建议使用DevOps管道来满足这种自定义需求。
您可以使用GitHub Actions来处理特定于Eclipse的文件:
https://github.com/Azure/webapps-deploy#create-azure-web-app-and-deploy-using-github-actions
https://stackoverflow.com/questions/58902459
复制相似问题