英文:
How to configuration projectId in pom.xml When using two project google cloud
问题
我已经开发了 Spring Boot 应用程序,并在 Google Cloud Platform(GCP)中创建了一个云构建流水线。
在我的 pom.xml 文件中,如何配置动态 projectId,因为我在 GCP 中有两个项目。
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.2.0</version>
<configuration>
<deploy.projectId>project1</deploy.projectId>
<deploy.version>4</deploy.version>
</configuration>
</plugin>
英文:
I have developed spring boot application and create a cloud build pipeline in GCP.
In My pom.xml, How to configure dynamic projectId, because I have two project in GCP.
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.2.0</version>
<configuration>
<deploy.projectId>project1</deploy.projectId>
<deploy.version>4</deploy.version>
</configuration>
</plugin>
答案1
得分: 2
部署具有动态项目ID的应用程序到App Engine,从项目的顶级目录(其中包含pom.xml
文件)运行以下命令:
mvn package appengine:deploy -Dapp.deploy.projectId=PROJECT_ID
如果您在pom.xml
文件中指定了项目ID,则此项目ID将被定义为默认项目。我建议从此文件中删除它,并在每次部署应用程序时指定项目。
您可以在以下链接上获取更多信息。
英文:
To deploy your app to App Engine with dynamic Project Ids, run the following command from your project's top level directory, where the pom.xml
file is located:
mvn package appengine:deploy -Dapp.deploy.projectId=PROJECT_ID
If you specify your Project id in the pom.xml
file this Project id will be defined as the default project, I suggest to remove it from this file and specify the project everytime you deploy your app.
You can obtain more information on the following link
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论