From e2e91133718d41349a94b5d93d66699e84233e64 Mon Sep 17 00:00:00 2001
From: Mridula <66699525+mpeddada1@users.noreply.github.com>
Date: Wed, 27 Apr 2022 15:50:24 -0400
Subject: [PATCH] docs(sample): remove unused dependency and add setup
instructions (#2010)
---
samples/native-image-sample/README.md | 37 ++++++++++++++++++++++++++-
samples/native-image-sample/pom.xml | 5 ----
2 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/samples/native-image-sample/README.md b/samples/native-image-sample/README.md
index e4e4b52ee..8d7bce658 100644
--- a/samples/native-image-sample/README.md
+++ b/samples/native-image-sample/README.md
@@ -4,7 +4,42 @@ The BigQuery sample application demonstrates some common operations with [Google
## Setup Instructions
-1. Follow the [GCP Project Authentication and Native Image Setup Instructions](../../README.md).
+## Setup Instructions
+
+You will need to follow these prerequisite steps in order to run the samples:
+
+1. If you have not already, [create a Google Cloud Platform Project](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project).
+
+2. Install the [Google Cloud SDK](https://cloud.google.com/sdk/) which will allow you to run the sample with your project's credentials.
+
+ Once installed, log in with Application Default Credentials using the following command:
+
+ ```
+ gcloud auth application-default login
+ ```
+
+ **Note:** Authenticating with Application Default Credentials is convenient to use during development, but we recommend [alternate methods of authentication](https://cloud.google.com/docs/authentication/production) during production use.
+
+3. Install the native image compiler.
+
+ You can follow [the installation instructions](https://www.graalvm.org/docs/getting-started/#install-graalvm) from the GraalVM website.
+ After following the instructions, ensure that you install the native image extension installed by running:
+
+ ```
+ gu install native-image
+ ```
+
+ Once you finish following the instructions, verify that the default version of Java is set to the GraalVM version by running `java -version` in a terminal.
+
+ You will see something similar to the below output:
+
+ ```
+ $ java -version
+
+ openjdk version "11.0.7" 2020-04-14
+ OpenJDK Runtime Environment GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02)
+ OpenJDK 64-Bit Server VM GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02, mixed mode, sharing)
+ ```
2. [Enable the BigQuery APIs](https://console.cloud.google.com/apis/api/bigquery.googleapis.com).
diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml
index a8955f889..de1ea6adf 100644
--- a/samples/native-image-sample/pom.xml
+++ b/samples/native-image-sample/pom.xml
@@ -90,11 +90,6 @@
native
-
- com.google.cloud
- native-image-support
- 0.13.1
-
org.junit.vintage
junit-vintage-engine