Skip to content

Commit

Permalink
Update PR comment. Add README file
Browse files Browse the repository at this point in the history
  • Loading branch information
shinfan committed Mar 11, 2017
1 parent 6438385 commit f095181
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
33 changes: 33 additions & 0 deletions APPENGINE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Use Google Cloud Java Client with GoogleAppEngine
=================================================

Quickstart
----------
This file provides extra instructions to setup Google Cloud Java client with GoogleAppEngine.
See [Quickstart](./README.md#quickstart) for Google Cloud Java common instructions.
See [Quickstart](https://cloud.google.com/appengine/docs/standard/java/quickstart) for extra GAE instructions.

git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git

If you are using Maven, add this to your pom.xml file
```xml
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.50</version>
</dependency>
```

If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.appengine:appengine-api-1.0-sdk:1.9.50'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.appengine" % "appengine-api-1.0-sdk" % "1.9.50"
```

To test with local dev server, run
```
mvn appengine:devserver
```
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ If you are using SBT, add this to your dependencies
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.9.4-alpha"
```

For GoogleAppEngine use case, see [more instructions here](./APPENGINE.md).

Example Applications
--------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@ protected static String getAppEngineProjectId() {
} catch (Exception exception) {
if (System.getProperty("com.google.appengine.runtime.version") != null) {
// Could not resolve appengine classes under GAE environment.
throw new RuntimeException("Unable to resolve appengine classes. Missing dependency.");
throw new RuntimeException("Unable to resolve appengine-sdk classes. For more details see "
+ "https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/APPENGINE.md");
}
return null;
}
Expand Down

0 comments on commit f095181

Please sign in to comment.