-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from GoogleCloudPlatform/datastore-samples
Datastore Concepts snippets and Getting Started app
- Loading branch information
Showing
5 changed files
with
1,364 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). | ||
|
||
2. Compile the program by typing `mvn clean compile` in command line. | ||
|
||
3. Run the program by typing `mvn exec:java` in command line. In addition to listing tasks via this command line interface, you can view tasks you create in the [Google Cloud Developer's Console](https://console.cloud.google.com/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.8</source> | ||
<target>1.8</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> |
Oops, something went wrong.