是什么生成了我的 "appengine-web.xml" 文件?
What generated my "appengine-web.xml" file?
我在 Google App Engine 中继承了配置为 运行 的 Java 应用程序。我的 pom 包含 com.google.appengine.appengine-maven-plugin 插件,它可能与此问题相关,也可能不相关。
在我的src目录下,在WEB-INF目录下,我有一个“app.yaml”文件。但是当我的项目构建成war时,目标目录既有“app.yaml”文件,也有“appengine-web.xml”文件。这个“appengine-web.xml”文件是如何到达这里的?
此“appengine-web.xml”文件的第一行显示 <!-- Generated from app.yaml. Do not edit. -->
。如果这个文件是从“app.yaml”文件生成的,那么它是由什么生成的?哪个 plugin/function 创建了这个文件?
如官方文档所述appengine-web.xml Reference:
App Engine Java applications use a configuration file, named appengine-web.xml, to specify information about your app and to identify which files in the app's WAR file are static files (like images) and which are resource files used by the application.
因此,这是在使用 App Engine Maven 插件时由 App Engine 环境默认创建的,因此您可以处理一些特定的设置和配置。您可以找到有关部署到 war 中的这些设置 here, but it includes the setting of environment variables, how to scale the application - manual, basic or automatic - etc. In addition to that, you can check this example of a sample app 的更多详细信息,并且还会创建该文件。 请记住,这仅适用于 Java 8.
总而言之,这个文件是在使用这个插件时由 App Engine 环境创建的,而不是由特定的函数创建的。在这个官方文档here中,也表明了这一点:
The artifact you used to create the project has done the basic src/main/webapp/WEB-INF/appengine-web.xml configuration for you
因此,这确认它是通过插件创建的。除此之外,它还显示了与 app.yaml
的关系消息,因为它们一起工作,并且每个都有特定的用途和设置,您的应用程序才能正常工作。
如果这些信息对您有帮助,请告诉我!
这是大约两年前删除的 App Engine Maven 插件的一个未记录的功能。
https://github.com/GoogleCloudPlatform/app-maven-plugin/issues/426#issuecomment-665757462
我在 Google App Engine 中继承了配置为 运行 的 Java 应用程序。我的 pom 包含 com.google.appengine.appengine-maven-plugin 插件,它可能与此问题相关,也可能不相关。
在我的src目录下,在WEB-INF目录下,我有一个“app.yaml”文件。但是当我的项目构建成war时,目标目录既有“app.yaml”文件,也有“appengine-web.xml”文件。这个“appengine-web.xml”文件是如何到达这里的?
此“appengine-web.xml”文件的第一行显示 <!-- Generated from app.yaml. Do not edit. -->
。如果这个文件是从“app.yaml”文件生成的,那么它是由什么生成的?哪个 plugin/function 创建了这个文件?
如官方文档所述appengine-web.xml Reference:
App Engine Java applications use a configuration file, named appengine-web.xml, to specify information about your app and to identify which files in the app's WAR file are static files (like images) and which are resource files used by the application.
因此,这是在使用 App Engine Maven 插件时由 App Engine 环境默认创建的,因此您可以处理一些特定的设置和配置。您可以找到有关部署到 war 中的这些设置 here, but it includes the setting of environment variables, how to scale the application - manual, basic or automatic - etc. In addition to that, you can check this example of a sample app 的更多详细信息,并且还会创建该文件。 请记住,这仅适用于 Java 8.
总而言之,这个文件是在使用这个插件时由 App Engine 环境创建的,而不是由特定的函数创建的。在这个官方文档here中,也表明了这一点:
The artifact you used to create the project has done the basic src/main/webapp/WEB-INF/appengine-web.xml configuration for you
因此,这确认它是通过插件创建的。除此之外,它还显示了与 app.yaml
的关系消息,因为它们一起工作,并且每个都有特定的用途和设置,您的应用程序才能正常工作。
如果这些信息对您有帮助,请告诉我!
这是大约两年前删除的 App Engine Maven 插件的一个未记录的功能。
https://github.com/GoogleCloudPlatform/app-maven-plugin/issues/426#issuecomment-665757462