java - 每次运行的 Google Cloud AppEngine Java 代码重复组件更新
问题描述
每当我说 appengine:run 时,我的 AppEngine 标准版 Java 代码(maven)都会更新组件,尽管组件是最新的。发现“appengine-maven-plugin”依赖导致了这个自动组件更新的问题。每当我说“appengine-maven-plugin”版本 1.3.1 时,我都没有任何问题,但如果我使用最新版本 2.2.0,那么组件每次都会更新。
感谢有人帮我解决这个问题
使用下面的日志,我们可以看到组件正在更新
C:\Lourdu\Development\ACT\SVN_Latest\demo>mvn clean install appengine:run [INFO] Scanning for projects... [INFO] [INFO]
------------------------------------------------------------------------ [INFO] Building helloworld 1.0-SNAPSHOT [INFO]
------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ helloworld --- [INFO] Deleting C:\Lourdu\Development\ACT\SVN_Latest\demo\target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ helloworld
--- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Lourdu\Development\ACT\SVN_Latest\demo\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ helloworld --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [INFO] Compiling 8 source files to C:\Lourdu\Development\ACT\SVN_Latest\demo\target\helloworld-1.0-SNAPSHOT\WEB-INF\classes [WARNING] /C:/Lourdu/Development/ACT/SVN_Latest/demo/src/main/java/com/example/appengine/java8/Utilities/Utilities.java: Some input files use or override a deprecated API. [WARNING] /C:/Lourdu/Development/ACT/SVN_Latest/demo/src/main/java/com/example/appengine/java8/Utilities/Utilities.java: Recompile with -Xlint:deprecation for details. [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ helloworld --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Lourdu\Development\ACT\SVN_Latest\demo\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ helloworld --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ helloworld --- [INFO] No tests to run. [INFO] [INFO] --- maven-war-plugin:2.2:war (default-war) @ helloworld --- [INFO] Packaging webapp [INFO] Assembling webapp [helloworld] in [C:\Lourdu\Development\ACT\SVN_Latest\demo\target\helloworld-1.0-SNAPSHOT] [INFO] Processing war project [INFO] Copying webapp resources [C:\Lourdu\Development\ACT\SVN_Latest\demo\src\main\webapp] [INFO] Webapp assembled in [67657 msecs] [INFO] Building war: C:\Lourdu\Development\ACT\SVN_Latest\demo\target\helloworld-1.0-SNAPSHOT.war [INFO] WEB-INF\web.xml already added, skipping [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ helloworld --- [INFO] Installing C:\Lourdu\Development\ACT\SVN_Latest\demo\target\helloworld-1.0-SNAPSHOT.war to C:\Users\lourdurajan_george\.m2\repository\com\example\appengine-j8\helloworld\1.0-SNAPSHOT\helloworld-1.0-SNAPSHOT.war [INFO] Installing C:\Lourdu\Development\ACT\SVN_Latest\demo\pom.xml to C:\Users\lourdurajan_george\.m2\repository\com\example\appengine-j8\helloworld\1.0-SNAPSHOT\helloworld-1.0-SNAPSHOT.pom [INFO] [INFO] --- appengine-maven-plugin:2.2.0:run (default-cli) @ helloworld ---
Your current Cloud SDK version is: 303.0.0 Installing components from version: 303.0.0
+---------------------------------------------------+ | These components will be installed. |
+------------------------------+---------+----------+ | Name | Version | Size |
+------------------------------+---------+----------+ | Cloud Datastore Emulator | 2.1.0 | 18.4 MiB | | gRPC python library | 1.20.0 | 1.5 MiB | | gRPC python library | 1.20.0 | | | gcloud app Java Extensions | 1.9.81 | 61.0 MiB | | gcloud app Python Extensions | 1.9.91 | 6.1 MiB |
+------------------------------+---------+----------+
For the latest full release notes, please visit: https://cloud.google.com/sdk/release_notes
#============================================================#
#= Creating update staging area =#
#============================================================#
下面的日志说,即使我们尝试使用 appengine-maven-plugin 版本 1.3.2 部署代码,最终还是会出现错误 Cloud SDK mismatch 错误。
INFO] --- appengine-maven-plugin:1.3.2:deploy (default-cli) @ helloworld ---
[INFO] Staging the application to: C:\Lourdu\Development\ACT\SVN_Latest\demo\target\appengine-staging
[INFO] Detected App Engine standard environment application.
Aug 06, 2020 12:11:13 AM com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
INFO: submitting command: C:\Program Files\Java\jdk1.8.0_201\jre\bin\java.exe -cp C:\Users\lourdurajan_george\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\java\lib\appengine-tools-api.jar com.google.appengine.tools.admin.AppCfg --disable_update_check --enable_jar_splitting stage C:\Lourdu\Development\ACT\SVN_Latest\demo\target\helloworld-1.0-SNAPSHOT C:\Lourdu\Development\ACT\SVN_Latest\demo\target\appengine-staging
[INFO] GCLOUD: Reading application configuration data...
[INFO] GCLOUD: 2020-08-06 00:11:20.417:INFO::main: Logging initialized @4363ms
[INFO] GCLOUD:
[INFO] GCLOUD:
[INFO] GCLOUD: Beginning interaction for module rbr_dev...
[INFO] GCLOUD: 0% Scanning for jsp files.
[INFO] GCLOUD: 0% Compiling jsp files.
[INFO] GCLOUD: Aug 06, 2020 12:12:07 AM org.apache.jasper.servlet.TldScanner scanJars
[INFO] GCLOUD: INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[INFO] GCLOUD: Aug 06, 2020 12:12:11 AM org.apache.jasper.JspC processFile
[INFO] GCLOUD: INFO: Built File: /views/index.jsp
[INFO] GCLOUD: Aug 06, 2020 12:12:11 AM org.apache.jasper.JspC processFile
[INFO] GCLOUD: INFO: Built File: /views/shared/_headerIncludes.jsp
[INFO] GCLOUD: Aug 06, 2020 12:12:12 AM org.apache.jasper.JspC processFile
[INFO] GCLOUD: INFO: Built File: /views/authenticationError.jsp
[INFO] GCLOUD: Aug 06, 2020 12:12:12 AM org.apache.jasper.JspC processFile
[INFO] GCLOUD: INFO: Built File: /views/home.jsp
[INFO] GCLOUD: Aug 06, 2020 12:12:12 AM org.apache.jasper.JspC processFile
[INFO] GCLOUD: INFO: Built File: /views/shared/_footer.jsp
[INFO] GCLOUD: Aug 06, 2020 12:12:12 AM org.apache.jasper.JspC processFile
[INFO] GCLOUD: INFO: Built File: /views/shared/_header.jsp
[INFO] GCLOUD: Aug 06, 2020 12:12:12 AM org.apache.jasper.JspC execute
[INFO] GCLOUD: INFO: Generation completed with [0] errors in [4793] milliseconds
[INFO] GCLOUD: Success.
[INFO] GCLOUD: Temporary staging for module rbr_dev directory left in C:\Lourdu\Development\ACT\SVN_Latest\demo\target\appengine-staging
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:36 min
[INFO] Finished at: 2020-08-06T00:12:18+05:30
[INFO] Final Memory: 12M/86M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy (default-cli) on project helloworld: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy failed: Cloud SDK versions before 171.0.0 are not supported -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
解决方案
推荐阅读
- swift - 如果变量 == 到数组的特定元素,则执行操作
- angular - 如果在 Angular 2+ 中选中三个以上,则禁用复选框
- reactjs - react-jsonschema-form-extra asynctypeahead,设置初始值
- bash - 退出并杀死 gdb 中的进程
- javascript - 调用者页面中的脚本无法访问由 ajax 显示的表
- php - 除 index.php 之外的所有 URL 的 Apache 别名
- redis - “警告:Memcached::setOption() 期望参数 1 为整数,字符串给定”使用来自“Redis Enterprise Cloud”的 Redis Memcached 和 Symfony 5
- javascript - Javascripts 包含函数在所有条件下都返回 false。只有其他部分正在执行
- java - 如何从java中使用JSON执行shell命令
- r - 仅为所有非零列绘制条形图