Skip to content

Move examples from the cloud-storage-docs-xml-api-examples repo, and update them to use Application Default Credentials. #14

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

Merged
merged 27 commits into from
May 29, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bafd8c3
Move from cloud-storagedocs-xml-api-examples
May 22, 2015
fed4ae8
Update READMEs for new dir structure
May 22, 2015
9ebe7fa
Rename directories to be less redundant.
May 22, 2015
dcf91cc
Update to use App Default Creds.
May 22, 2015
ccf5fc8
Remove package, so eclipse isn't confused.
May 22, 2015
dd10b2c
Add Application Default Credentials quirks.
May 22, 2015
309d399
Update: no longer using service accounts.
May 26, 2015
f606873
Merge remote-tracking branch 'origin/master' into jerjou/xml-api
May 28, 2015
014079d
Add checkstyle plugin
May 28, 2015
c2b6935
More check style configuration
May 28, 2015
1b9f309
Fix style on DeferSampleServlet
May 28, 2015
45920e1
More check style changes
May 28, 2015
0e4514f
Finish fixing Async Query and Defer Sample
May 28, 2015
99a7533
Fix style in BigqueryServiceFactory
May 28, 2015
3f58947
Fix style errors on BigqueryUtils
May 28, 2015
8fc1c6d
Fix style on ExportDataCloudStorageSample
May 28, 2015
e514139
Fix style on LoadDataCsvSample
May 28, 2015
d989529
Remove vestigial key.json. README points to doc
May 28, 2015
78daa80
Fix StreamingSample checkstyle
May 28, 2015
005689f
Fix SyncQuerySample
May 28, 2015
69e24dc
Fail on bad style
May 28, 2015
b34b01c
Fix java style violations.
May 28, 2015
5019fb6
Merge branch 'jerjou/xml-api' of github.com:GoogleCloudPlatform/java-…
May 28, 2015
957da6b
Fix java style violations.
May 28, 2015
a0d74ee
Remove unused 'all' tag.
May 28, 2015
3f26d5b
Style: prettier line break.
May 29, 2015
a33bbb0
AsyncQuerySample extends BigqueryUtils, so can't be final
May 29, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename directories to be less redundant.
  • Loading branch information
Jerjou Cheng committed May 22, 2015
commit 9ebe7fa5edbd414de01944e4ad027648c5d96856
4 changes: 2 additions & 2 deletions cloud-storage/xml-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ java-docs-samples/cloud-storage XML API Examples

Samples used in Google Cloud Storage documentation (https://developers.google.com/storage/docs/xml-api-java-samples).

- **storage-serviceaccount-cmdline-sample** - Uses a service account private key and client ID to generate credentials to access a specified bucket.
- **serviceaccount-cmdline-sample** - Uses a service account private key and client ID to generate credentials to access a specified bucket.

- **storage-serviceaccount-appengine-sample** - Uses Google App Engine credentials to access a specified bucket. You must add the App Engine Service Account Name to the Permissions of the project that contains the bucket.
- **serviceaccount-appengine-sample** - Uses Google App Engine credentials to access a specified bucket. You must add the App Engine Service Account Name to the Permissions of the project that contains the bucket.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Using the Service Account App Engine Sample
Browse Online
-------------

The main code file is [StorageSample.java](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/cloud-storage/xml-api/storage-serviceaccount-cmdline-sample/src/main/java/StorageServiceAccountSample.java).
The main code file is [StorageSample.java](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/cloud-storage/xml-api/serviceaccount-appengine-sample/src/main/java/StorageServiceAccountSample.java).

Add Your App Engine Service Account Name to the Project Team
------------------------------------------------------------
Expand All @@ -22,7 +22,7 @@ https://help.github.com/articles/set-up-git).

cd [someDirectory]
git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git
cd java-docs-samples/cloud-storage/xml-api/storage-serviceaccount-appengine-sample
cd java-docs-samples/cloud-storage/xml-api/serviceaccount-appengine-sample
mvn clean package

To enable logging of HTTP requests and responses (highly recommended when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<version>5</version>
</parent>
<groupId>com.google.apis-samples</groupId>
<artifactId>storage-serviceaccounts-appengine-sample</artifactId>
<artifactId>serviceaccounts-appengine-sample</artifactId>
<version>1.0.0</version>
<name>Example for Google Cloud Storage using OAuth 2.0 Service Accounts on Google App Engine</name>
<packaging>war</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Using the Service Account Command Line Sample
Browse Online
--------------

The main file is [StorageServiceAccountSample.java](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/cloud-storage/xml-api/storage-serviceaccount-cmdline-sample/src/main/java/StorageServiceAccountSample.java).
The main file is [StorageServiceAccountSample.java](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/cloud-storage/xml-api/serviceaccount-cmdline-sample/src/main/java/StorageServiceAccountSample.java).

Get a Service Account
---------------------
Expand All @@ -24,7 +24,7 @@ You may need to set your `JAVA_HOME`.

cd [someDirectory]
git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git
cd java-docs-samples/cloud-storage/xml-api/storage-serviceaccount-cmdline-sample
cd java-docs-samples/cloud-storage/xml-api/serviceaccount-cmdline-sample

2. Update key.p12 file.
3. Edit `StorageServiceAccountSample.java` to add your bucket and service account email.
Expand All @@ -51,12 +51,12 @@ Set Up a Project in Eclipse
* check on "Download Artifact Sources"
* check on "Download Artifact JavaDoc"

* Clone the `storage-serviceaccount-cmdline-sample` to your computer
* Clone the `serviceaccount-cmdline-sample` to your computer

* You can use either a plugin with Eclipse or any other tool you normally use
to work with GitHub repositories.

* Create a new project using `storage-serviceaccount-cmdline-sample`
* Create a new project using `serviceaccount-cmdline-sample`

* Create a new Java Project.
* Choose the **Location** of the project to be the root directory of the sample you cloned locally.
Expand Down