我使用 maven 创建了一个项目,其“布局”如下 - proj-ear - module1-war - module2-war
使用“mvn appengine:devserver”运行它就可以了,两个应用程序/模块都启动并显示在管理控制台中。但是,我无法使用“mvn gcloud:run”运行它(如果/当我想将模块移动到托管虚拟机时,我认为这是必要的?)
我得到:...
[INFO] INFO: Starting API server at: `http://localhost:50500`
[INFO] INFO: Starting module "module1" running at: `http://localhost:8080`
[INFO] INFO: Applying all pending transactions and saving the datastore
...
[INFO] google.appengine.tools.devappserver2.wsgi_server.BindError: Unable to bind localhost:8081
[ERROR] Error: gcloud app xxx exit code is: 1
...
使用 mvn:run 最终会调用实际的“gcloud preview app run”命令,所以我不认为这是一个 maven 问题。
为什么会发生这种情况以及如何解决的任何想法?