如何在Azure中实现持续交付后自动运行Maven项目,并显示正确的网页。

huangapple go评论66阅读模式
英文:

How to auto-run maven project with Azure after CD and display correct webpage

问题

我正在尝试托管一个网页,但我不确定如何做,搜索也没有显示与我特定尝试的相关内容。

我在GitHub上有一个Java Maven项目,并且已经设置了CD到Azure,所以每当我推送到GitHub时,Azure会下载该项目。

当你运行Maven程序时,会在存储库中创建一个名为“webpage.html”的HTML文件。我希望在进入我的Azure网页时能够显示这个HTML文件。

所以,每当我推送到GitHub,Azure克隆项目后,我希望它运行Maven程序(以创建HTML文件),然后在你进入网站时显示HTML文件。我应该如何做到这一点?

我已经验证了Azure确实克隆了Git存储库,但我不知道如何让它运行Java代码并显示HTML文件。

英文:

I’m trying to host a webpage but I’m unsure as to how and googling doesn’t show anything relevant to what I’m trying to do specifically.

I have a Java maven project on GitHub, and I’ve set up CD to Azure so whenever I push to GitHub, Azure downloads the project.

When you run the maven program a “webpage.html” is created in the repository. I want this html file to be displayed when I enter my Azure webpage.

So, whenever I push to GitHub and Azure clones the project, I want it to run the maven program (to create the html file) and then display the html file when you enter the website. How do I do this?

I have verified that azure does indeed clone the git repository, but I don't see how I make it run the java code and display the html file.

答案1

得分: 1

确保“webpage.html”在“设置 - 配置 - 默认文档”列表中。

如何在Azure中实现持续交付后自动运行Maven项目,并显示正确的网页。

英文:

Make sure that “webpage.html” is in the “settings - configuration - default documents" list.

如何在Azure中实现持续交付后自动运行Maven项目,并显示正确的网页。

huangapple
  • 本文由 发表于 2020年5月4日 19:20:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/61591021.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定