gcloud app deploy command error INVALID_ARGUMENT: WEB-INF/appengine-web.xml is required for this runtime

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

gcloud app deploy command error INVALID_ARGUMENT: WEB-INF/appengine-web.xml is required for this runtime

问题

我尝试将在Google App Engine项目中的appengine-web.xml文件中的工作转换为与app.yaml文件配合使用,因此我创建了app.yaml文件并将其放入项目的主文件夹中。
当我尝试使用“gcloud app deploy”命令部署项目时,
我收到错误消息:
INVALID_ARGUMENT:需要WEB-INF/appengine-web.xml以供此运行时使用。
如果我运行“gcloud app deploy path/appengine-web.xml”命令,
部署可以正常工作。
我需要做什么才能转换为与app.yaml文件一起工作?
附加信息:
我的项目使用Java 8编写。
我的项目在Eclipse中编写。

谢谢

英文:

I try to convert work from appengine-web.xml file to work with app.yaml file in google app engine project, so I created app.yaml file and put it in main folder of project.
when I try to deploy my project with "gcloud app deploy" command
I get error
INVALID_ARGUMENT: WEB-INF/appengine-web.xml is required for this runtime
if I run "gcloud app deploy path/appengine-web.xml" command
the deploy is work fine
what i need to to convert to work with app.yaml file?
additions info
my project write in java8
my project write in eclipse

thank you

答案1

得分: 1

Java应用程序 在部署到应用引擎中时,必须在其WAR中的WEB-INF/目录下有一个名为 appengine-web.xml 的文件。

我查阅了 gcloud app deploy 命令的文档,看起来对于Java 8,您需要运行:

gcloud app deploy ~/my_app/WEB-INF/appengine-web.xml

这就是您正在运行的命令。

另一方面,我找到了这个文档适用于灵活环境),其中提到了如何组织文件,以防您想要为Java 8使用app.yaml。

英文:

One Java Application that will be deployed in App Engine must have a file named appengine-web.xml in its WAR, in the directory WEB-INF/.

I verified the gcloud app deploy command documentation and it seems that for Java 8 you need to run :

<!-- language: lang-html -->

gcloud app deploy ~/my_app/WEB-INF/appengine-web.xml

<!-- end snippet -->

That is the one that you are running.

On the other hand, I found this documentation (for Flexible ) that mentions how to organize your files in case that you want to use the app.yaml for java 8

答案2

得分: 0

根据文档指示,对于Java8标准应用程序,您必须添加到位于WEB-INF目录内的appengine-web.xml文件的路径。gcloud app deploy会跳过在.gcloudignore文件中指定的文件,请参阅gcloud主题gcloudignore以获取更多信息。链接:https://cloud.google.com/sdk/gcloud/reference/app/deploy

英文:

As the documetnatyion indicated that,for Java8 Standard apps, you must add the path to the appengine-web.xml file inside the WEB-INF directory. gcloud app deploy skips files specified in the .gcloudignore file see gcloud topic gcloudignore for more information.

huangapple
  • 本文由 发表于 2020年10月18日 00:54:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/64404986.html
匿名

发表评论

匿名网友

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

确定