0
Caused by: java.lang.IllegalArgumentException: Deployment projectId must be defined or configured to read from system state
1. Set <deploy.projectId>my-project-id</deploy.projectId>
2. Set <deploy.projectId>APPENGINE_CONFIG</deploy.projectId> to use <application> from appengine-web.xml
3. Set <deploy.projectId>GCLOUD_CONFIG</deploy.projectId> to use project from gcloud config.
    at com.google.cloud.tools.maven.AppEngineStandardDeployer.setDeploymentProjectAndVersion (AppEngineStandardDeployer.java:152)

I tried to provide the projectId using various ways, it is not working. I tried to provide the projectId using properties in the pom.xml file

<properties>
        <deploy.projectId>APPENGINE_CONFIG</deploy.projectId>
</properties>

But that didn't solve the issue. Then I tried to do, mvn appengine:deploy -DprojectId=APPENGINE_CONFIG

also tried -Ddeploy.projectId=APPENGINE_CONFIG. I am not sure where I should have this property.

This started happening especially after trying the latest 2.0.0-rc1 appengine-maven-plugin.

https://github.com/GoogleCloudPlatform/app-maven-plugin

Vijay Bhushan
  • 173
  • 3
  • 11

2 Answers2

3
<plugin>
  <groupId>com.google.cloud.tools</groupId>
  <artifactId>appengine-maven-plugin</artifactId>
  <version>2.0.0-rc2</version>
  <configuration>
    <deploy.projectId>something</deploy.projectId>
    <deploy.version>something</deploy.version>
  </configuration>

That "something" above could be projectId and version or you can say APPENGINE_CONFIG if you want the projectId and version to be retrieved from the appengine_web.xml. You can also specify GCLOUD_CONFIG. I tried this solution and it worked.

https://github.com/GoogleCloudPlatform/app-maven-plugin/issues/338#issuecomment-432742529

Vijay Bhushan
  • 173
  • 3
  • 11
0

(from https://github.com/GoogleCloudPlatform/app-maven-plugin/issues/338#issuecomment-432742529)

You need to set it under the plugin <configuration>:

<plugin>
  <groupId>com.google.cloud.tools</groupId>
  <artifactId>appengine-maven-plugin</artifactId>
  <version>2.0.0-rc2</version>
  <configuration>
    <deploy.projectId>something</deploy.projectId>
  </configuration>

However, you can also set it through properties, but in that case, the name should be <app.deploy.projectId> instead of <deploy.projectId>.

The plugin dev team will work on improving the error message to make this clear.

Chanseok Oh
  • 3,920
  • 4
  • 23
  • 63