-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datastore Concepts snippets and Getting Started app #90
Changes from 1 commit
43fa63e
d6bfb60
c7b4340
7f34191
63f756a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Datastore Samples | ||
|
||
This directory contains sample code used in Google Cloud Datastore documentation. Included here is a sample command line application, `TaskList`, that interacts with Datastore to manage a to-do list. | ||
|
||
## Run the `TaskList` sample application. | ||
|
||
1. Ensure that you have: | ||
* Created a Google Developers Console project with the Datastore API enabled. Follow [these instructions](https://cloud.google.com/docs/authentication#preparation) to get your project set up. | ||
* Installed the Google Cloud SDK and run the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. | ||
* Installed [Maven](https://maven.apache.org/) and Java 7 (or above). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Emulator? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any comments about viewing tasks in cloud console? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gcloud-java downloads the emulator for you if you haven't installed it, so I left it out here. I'll add a sentence about viewing tasks in cloud console. |
||
|
||
2. Compile the program by typing `mvn clean compile` in command line. | ||
|
||
3. Run the program by typing `mvn exec:java` in command line. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.google.datastore.snippets</groupId> | ||
<artifactId>datastore-snippets</artifactId> | ||
<version>1.0</version> | ||
<packaging>jar</packaging> | ||
<name>Google Cloud Datastore Snippets</name> | ||
<description> | ||
Example snippets for Datastore concepts and getting started documentation. | ||
</description> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.gcloud</groupId> | ||
<artifactId>gcloud-java-datastore</artifactId> | ||
<version>0.1.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<!-- // [START maven]--> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.5.1</version> | ||
<configuration> | ||
<source>1.7</source> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be 1.8 now. (Unless it's for Standard) |
||
<target>1.7</target> | ||
</configuration> | ||
</plugin> | ||
<!-- // [END maven]--> | ||
<!-- // [START exec] --> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>1.4.0</version> | ||
<configuration> | ||
<mainClass>com.google.datastore.snippets.TaskList</mainClass> | ||
</configuration> | ||
</plugin> | ||
<!-- // [END exec] --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
<version>2.17</version> | ||
<configuration> | ||
<configLocation>../google-checks.xml</configLocation> | ||
<consoleOutput>true</consoleOutput> | ||
<failOnViolation>true</failOnViolation> | ||
<failsOnError>true</failsOnError> | ||
</configuration> | ||
<executions> | ||
<execution><goals><goal>check</goal></goals></execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App Engine Managed VMs or Standard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah MVM / any Java.