Set up Google Cloud SDK or App Engine SDK or both for development?

669 views
Skip to first unread message

Grass CFA

unread,
May 16, 2018, 12:36:12 PM5/16/18
to Google App Engine

Hi,


I am setting up a dev environment on Eclipse Neon.3 for App Engine development.

According to the Google Cloud Platform documentation, developers will need to download and install Google Cloud SDK through Eclipse Marketplace. Developers will also need to download and install the App Engine SDK separately.

https://cloud.google.com/sdk/
https://cloud.google.com/appengine/docs/standard/java/download

It also states the gcloud app Java extensions have to be download and installed along with Google Cloud SDK.

I have done the installation of Google Cloud SDK and its gcloud app Java extensions.


My question is what is the point to download and install the App Engine SDK separately if the Google Cloud SDK has already contained the App Engine SDK? If so, does it sound like duplicated work?

I have created a testing Google App Engine Standard Java project using the Google Cloud wrizard on Eclipse. It seems the App Engine SDK comes from my local Maven repository.


If the App Engine SDK has to be downloaded and installed separately, how can it be referenced for use in the Eclipse project instead of the one in the Maven repository?

Google Cloud SDK, the gcloud app Java extensions, and App Engine SDK, these are all very confusing to me.

Thanks!

George (Cloud Platform Support)

unread,
May 16, 2018, 1:40:09 PM5/16/18
to Google App Engine
There are other ways to install the Cloud SDK, the preferred one is in conjunction with installing Cloud Tools for Eclipse. While installing the tools, it searches your computer for the Cloud SDK. If it can't find the SDK, then it automatically downloads the latest version of the SDK. It also periodically checks for and installs updates as needed. Regarding the reference to the SDK from Eclipse, you can either allow Cloud Tools for Eclipse to automatically manage the SDK for you, or you can manage the SDK yourself.

There is no duplicate work, as the Cloud Tools install searches your computer for the Cloud SDK to reuse it. In short, you can download and install the SDK separately, your work won't get wasted. You may check the "Managing the SDK for Your Project" online document for reference. 

Grass CFA

unread,
May 17, 2018, 10:34:26 AM5/17/18
to Google App Engine
Hello George,

Thank you for your reply.

I have instlaled the Google Cloud Tool for Eclipse from Google Marketplace following the instructions. Google Cloud SDK has also been downloaded and installed separately.

My question was regarding to Google App Engine SDK. It seems the Eclipse automatically uses the SDK jar files from the local Maven repository (see the screenshot as above please) rather than the SDK that I downloaded and installed separately. https://cloud.google.com/appengine/docs/standard/java/download

Is it managed by the Google Cloud Tool for Eclipse (gcloud)? How can I configure Eclipse to use the SDK that I downloaded and installed? I couldn't find any instruction as to it.

Hope it was made clear to you.

Cheers,

Brian de Alwis

unread,
May 17, 2018, 11:00:39 AM5/17/18
to google-a...@googlegroups.com
Hi.

I find it helpful to think of the Cloud SDK as "programs for manipulating and emulating GCP resources".  It doesn't include the APIs and client libraries.

Although the `app-engine-java` component would seem to install the App Engine SDK for Java, that installation is an internal implementation detail to the Cloud SDK.  It just happens that some of those programs use jars and other resources included in the App Engine Java SDK and so it's bundled alongside.

But the Cloud SDK reserves the right to repackage and radically alter the `app-engine-java` component.  For example, the Java-based programs could be packaged using `jlink` and so the jars would no longer be necessary.

So development tools, such as Cloud Tools for Eclipse, must download and install canonical versions of the API jars and dependencies.

Brian.


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/4642397c-a8b6-4d1e-a052-8f8f42d3fe10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

George (Cloud Platform Support)

unread,
May 17, 2018, 3:02:13 PM5/17/18
to Google App Engine
What makes you think that the Eclipse automatically uses the SDK jar files from the local Maven repository? 

In any case, you can select the SDK installation you prefer. In the Eclipse Preferences dialog, the Google Cloud Tools setting shows the Google Cloud SDK configuration. When the Choose SDK checkbox is clear, then Cloud Tools for Eclipse is managing the SDK. You can choose right there the version of the SDK you prefer, and the way this is managed. The illustration to be seen on the "Managing the SDK for Your Project" documentation page should be quite helpful. 

Grass CFA

unread,
May 17, 2018, 9:14:07 PM5/17/18
to Google App Engine
Hi all,

Thanks for all that you have replied!

This is what I have on the Google Cloud Tools settings on Eclipse. If I have unchecked the "Choose SDK" option the SDK Location area was greyed out, so that it stopped me specifying a different SDK location here.


I have successfully run a Hello World Google App Engine Standard Java project. The project structure is as below. I didn't include the App Engine API and obviously the App Engine SDK Jar file is not included either. But the project still compiled and ran. The App Engine Standard Runtime only contains the servet and jsp api jar files. I couldn't find anywhere I can reference the App Engine SDK jars. Are the servlet api and jsp api sufficient for an App Engine project to run? This is really confusing me.


Thanks!

Cheers,

Brian de Alwis

unread,
May 17, 2018, 10:48:54 PM5/17/18
to google-a...@googlegroups.com
On 17-May-2018, at 9:14 PM, Grass CFA <grassland....@gmail.com> wrote:
> This is what I have on the Google Cloud Tools settings on Eclipse. If I have unchecked the "Choose SDK" option the SDK Location area was greyed out, so that it stopped me specifying a different SDK location here.

This location is used by Cloud Tools for Eclipse to (1) deploy to GCP and (2) to access the development local server (`dev_appserver`) to run and debug App Engine Standard apps locally.

> I couldn't find anywhere I can reference the App Engine SDK jars. Are the servlet api and jsp api sufficient for an App Engine project to run? This is really confusing me.

Use the "Google Cloud Libraries" library group. See the following for details:

https://cloud.google.com/eclipse/docs/libraries

Brian.

George (Cloud Platform Support)

unread,
May 18, 2018, 3:24:09 PM5/18/18
to Google App Engine
As mentioned, while installing the tools, the installer searches your computer for the Cloud SDK. If it can't find the SDK, then it automatically downloads the latest version of the SDK. You don't have to worry specifically about this install, and allow the Cloud Tools for Eclipse to automatically manage the SDK for you. 

Kaan Soral

unread,
May 18, 2018, 5:54:33 PM5/18/18
to Google App Engine
Not really on topic, but as some sane and simplifying advice - It's best to move away from IDE's like Eclipse

Their purpose is to simplify development, but from your experiences too, it's clear that they don't deliver on their promises, and complicate things instead

I'd suggest you to write the code with whatever IDE you prefer, then use the command line tools separately in a serene manner

My personal choice is the App Engine Python SDK for Linux, even though I'm on macOS (it includes pure code, no installer, just pure python code, granted things are usually more complicated for Java, but the same experience might apply) - You might give it a try, and if it doesn't work, you can always go back to Eclipse

Richard Bernstein

unread,
May 18, 2018, 6:16:29 PM5/18/18
to google-a...@googlegroups.com

I am glad you added this comment. I am not sure what you mean by serene manner? What I think you just said (and tell me if I misunderstood) is develop with your favorite sdk on your local pc, and when you are done use command line tools to upload it and set it up. In my case my code is php under Windows so I should find and use App Engine PHP SDK for Windows to upload and configure. Did I get this right? And not bother with phpstorm for app engine?

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/c23a7055-953c-49bc-92cc-077264ca2e00%40googlegroups.com.

Kaan Soral

unread,
May 18, 2018, 6:23:36 PM5/18/18
to Google App Engine
By serene, I mean development should be fun and simple


Finding dev_appserver.py is going to be a bit challenging tho, If you were on Linux, this would probably be the way to go: https://cloud.google.com/appengine/docs/standard/php/download#php_linux
Reply all
Reply to author
Forward
0 new messages