Skip to content

Commit 43fa63e

Browse files
author
Ajay Kannan
committed
Initial commit for datastore concepts snippets and getting started sample app.
1 parent 486352c commit 43fa63e

File tree

5 files changed

+1370
-0
lines changed

5 files changed

+1370
-0
lines changed

datastore/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Datastore Samples
2+
3+
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.
4+
5+
## Run the `TaskList` sample application.
6+
7+
1. Ensure that you have:
8+
* 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.
9+
* Installed the Google Cloud SDK and run the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.
10+
* Installed [Maven](https://maven.apache.org/) and Java 7 (or above).
11+
12+
2. Compile the program by typing `mvn clean compile` in command line.
13+
14+
3. Run the program by typing `mvn exec:java` in command line.

datastore/pom.xml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>com.google.datastore.snippets</groupId>
7+
<artifactId>datastore-snippets</artifactId>
8+
<version>1.0</version>
9+
<packaging>jar</packaging>
10+
<name>Google Cloud Datastore Snippets</name>
11+
<description>
12+
Example snippets for Datastore concepts and getting started documentation.
13+
</description>
14+
<dependencies>
15+
<dependency>
16+
<groupId>com.google.gcloud</groupId>
17+
<artifactId>gcloud-java-datastore</artifactId>
18+
<version>0.1.3</version>
19+
</dependency>
20+
<dependency>
21+
<groupId>junit</groupId>
22+
<artifactId>junit</artifactId>
23+
<version>4.12</version>
24+
</dependency>
25+
</dependencies>
26+
<build>
27+
<plugins>
28+
<!-- // [START maven]-->
29+
<plugin>
30+
<groupId>org.apache.maven.plugins</groupId>
31+
<artifactId>maven-compiler-plugin</artifactId>
32+
<version>2.5.1</version>
33+
<configuration>
34+
<source>1.7</source>
35+
<target>1.7</target>
36+
</configuration>
37+
</plugin>
38+
<!-- // [END maven]-->
39+
<!-- // [START exec] -->
40+
<plugin>
41+
<groupId>org.codehaus.mojo</groupId>
42+
<artifactId>exec-maven-plugin</artifactId>
43+
<version>1.4.0</version>
44+
<configuration>
45+
<mainClass>com.google.datastore.snippets.TaskList</mainClass>
46+
</configuration>
47+
</plugin>
48+
<!-- // [END exec] -->
49+
<plugin>
50+
<groupId>org.apache.maven.plugins</groupId>
51+
<artifactId>maven-checkstyle-plugin</artifactId>
52+
<version>2.17</version>
53+
<configuration>
54+
<configLocation>../google-checks.xml</configLocation>
55+
<consoleOutput>true</consoleOutput>
56+
<failOnViolation>true</failOnViolation>
57+
<failsOnError>true</failsOnError>
58+
</configuration>
59+
<executions>
60+
<execution><goals><goal>check</goal></goals></execution>
61+
</executions>
62+
</plugin>
63+
</plugins>
64+
</build>
65+
</project>

0 commit comments

Comments
 (0)