0

Yes, I went through similar question on 'Goal' not found Error. But havent been able to solve my problem -

Im deploying my SpringBoot App to GCP and following this.

Had a few hiccups so far, but managed to overcome.

This time, the problem is that I added the goal, but still I see the same error. Like this ->

<plugin>
<groupId>com.google.cloud.tools</groupId>
     <artifactId>appengine-maven-plugin</artifactId>
     <version>1.3.1</version>
      <configuration>
      <project>${endpoints.project.id}</project>
             <version>1</version>
          <devserver.host>localhost</devserver.host>
          <devserver.port>8888</devserver.port>
         </configuration>
</plugin>

Also, I updated maven to latest version, did a 'mvn clean package' (which was successful build) and then did 'mvn appengine:devserver' and it says -

[ERROR] Could not find goal 'devserver' in plugin com.google.cloud.tools:appengine-maven-plugin:1.3.1 among available goals deploy, deployCron, deployDispatch, deployDos, deployIndex, deployQueue, genRepoInfoFile, help, run, stage, start, stop -> [Help 1]
[ERROR]

Any suggestions, warmly welcome!

Thanks.

Nakini
  • 772
  • 1
  • 8
  • 19
Geeta Puri
  • 13
  • 4

2 Answers2

1

There are two App Engine Maven plugins you can use to launch your SpringBoot app: App Engine SDK-based and Cloud SDK-based.

The App Engine SDK-based plugin should have the following groupId entry in pom.xml:

<groupId>com.google.appengine</groupId> 

and the command to run the App Engine development web server is

$ mvn appengine:devserver

The Cloud SDK-based plugin should have the following groupId entry in pom.xml:

<groupId>com.google.cloud.tools</groupId> 

and the command to run the App Engine development web server is

$ mvn appengine:run

In that case you were using the wrong command for the chosen plugin.

Using $ mvn appengine:run with your code should work.

Philipp Sh
  • 967
  • 5
  • 11
  • So I was perhaps true in assuming that this plugin wont be meant for development... only for deployment.. let me try that.. thanks.. – Geeta Puri May 09 '18 at 07:19
  • Oh well.. I tried mvn appengine:run and it says - [ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:run (default-cli) on project demo: Dev App Server does not support App Engine Flexible Environment applications. -> [Help 1] – Geeta Puri May 09 '18 at 07:28
  • The problem arises because you are using App Engine flexible, whereas the tutorial that you are following explains how to deploy the app in App Engine standard. In order to deploy it in flexible, you can attempt to run the following command: mvn jetty:run . You will need to use the maven jetty plugin. The related code can be found here: https://cloud.google.com/appengine/docs/flexible/java/using-maven – Philipp Sh May 09 '18 at 13:40
  • Yes tried that.. and when i go to deploy using mvn appengine:deploy, it fails in the end with the error - app.yaml not found.. – Geeta Puri May 10 '18 at 05:01
  • The issue you have needs a deeper investigation. I would suggest you file a case through the Google Cloud Platform support page if you have Premium Support from Google or if you are on your free trial. – Philipp Sh May 10 '18 at 09:41
  • Well did that.. while waiting for their reply, found a few more blogs online that helped me deploy my first app on the google cloud (some info from here n there)! Thanks for all your suggestions.. – Geeta Puri May 10 '18 at 09:48
0

In my case, the gcloud App-Engine java component was missing, I had to install it by running:

gcloud components install app-engine-java

After that, the App-Engine maven plugin worked properly.

jcflorezr
  • 326
  • 4
  • 13