From 64f067f6f2b7ff55c8ee070b89e7183806169287 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 23 May 2017 16:33:58 -0700 Subject: [PATCH 1/7] Added additional information on discovery doc generation to README.md --- .../migration-example/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/appengine/endpoints-frameworks-v2/migration-example/README.md b/appengine/endpoints-frameworks-v2/migration-example/README.md index 653e98d3917..4785b4e38b3 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/README.md +++ b/appengine/endpoints-frameworks-v2/migration-example/README.md @@ -35,6 +35,12 @@ process is explained [here][8] and a quickstart is provided [here][9]. - [Google Cloud Endpoints Frameworks Gradle Plugin][11] ## Setup +1. The hostname used in a genearted Discovery document is set by replacing + `GOOGLE_CLOUD_PROJECT` with your project id found in the following files. + + - [Maven - pom.xml](pom.xml) + - [Gradle - build.gradle](build.gradle) + 1. [Optional]: User Authenticating with Google Accounts in Web Clients 1. Update the `WEB_CLIENT_ID` in [Constants.java](src/main/java/com/example/helloendpoints/Constants.java) @@ -88,6 +94,11 @@ process is explained [here][8] and a quickstart is provided [here][9]. [http://localhost:8080/_ah/api/explorer][13] +1. Generate the discovery document located at + `target/discovery-docs/helloworld-v1-rest.discovery` by using: + + `mvn endpoints-framework:discoveryDocs` + 1. Generate the client library located at `target/client-libs/helloworld-v1-java.zip` by using: @@ -111,6 +122,11 @@ process is explained [here][8] and a quickstart is provided [here][9]. [http://localhost:8080/_ah/api/explorer][13] +1. Generate the discovery document located at + `build/endpointsDiscoveryDocs/helloworld-v1-rest.discovery` by using: + + `gradle endpointsDiscoveryDocs` + 1. Generate the client library located at `build/endpointsClientLibs/helloworld-v1-java.zip` by using: From 0e2f3cd72572c76004720026029859cccc2559a3 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 23 May 2017 16:35:08 -0700 Subject: [PATCH 2/7] Updated endpoints framework plugin versions and added hostname param --- .../migration-example/build.gradle | 9 +++++---- .../endpoints-frameworks-v2/migration-example/pom.xml | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/build.gradle b/appengine/endpoints-frameworks-v2/migration-example/build.gradle index 9c04913bc59..fe96308cf91 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/build.gradle +++ b/appengine/endpoints-frameworks-v2/migration-example/build.gradle @@ -20,10 +20,10 @@ buildscript { // Configuration for building } dependencies { // App Engine Gradle plugin - classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.0' + classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.1' // Endpoints Frameworks Gradle plugin - classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0-beta9' + classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0' } } // [END buildscript] @@ -71,11 +71,12 @@ appengine { // App Engine tasks configuration } } -/* [START endpoints-server] +// [START endpoints-server] endpointsServer { // Endpoints Framework Plugin server-side configuration + hostname = "GOOGLE_CLOUD_PROJECT.appspot.com" } -[END endpoints-server] */ +// [END endpoints-server] group = 'com.example.helloendpoints' // Generated output GroupId version = '1' // Version in generated output diff --git a/appengine/endpoints-frameworks-v2/migration-example/pom.xml b/appengine/endpoints-frameworks-v2/migration-example/pom.xml index 8a0b1901335..94517223e8c 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/pom.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/pom.xml @@ -95,9 +95,10 @@ limitations under the License. com.google.cloud.tools endpoints-framework-maven-plugin - 1.0.0-beta5 + 1.0.0 + GOOGLE_CLOUD_PROJECT.appspot.com From 09417bddd0f18e46fa1be5ffc1368d6776a6a7ad Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 23 May 2017 17:12:42 -0700 Subject: [PATCH 3/7] Changed wording for hostname parameter --- .../endpoints-frameworks-v2/migration-example/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/README.md b/appengine/endpoints-frameworks-v2/migration-example/README.md index 4785b4e38b3..f378dd7bef7 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/README.md +++ b/appengine/endpoints-frameworks-v2/migration-example/README.md @@ -35,11 +35,12 @@ process is explained [here][8] and a quickstart is provided [here][9]. - [Google Cloud Endpoints Frameworks Gradle Plugin][11] ## Setup -1. The hostname used in a genearted Discovery document is set by replacing - `GOOGLE_CLOUD_PROJECT` with your project id found in the following files. +1. Change `GOOGLE_CLOUD_PROJECT` with your project id in the hostname parameter + defined in either the Maven or Gradle build script. Hostname is used when a + discovery document is generated. - - [Maven - pom.xml](pom.xml) - - [Gradle - build.gradle](build.gradle) + - [Maven - pom.xml](pom.xml) + - [Gradle - build.gradle](build.gradle) 1. [Optional]: User Authenticating with Google Accounts in Web Clients From 8c958ca2abb436e827ee3365d1ed7052e87ec3f4 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 23 May 2017 17:14:30 -0700 Subject: [PATCH 4/7] Added link-to-line instead of file. --- appengine/endpoints-frameworks-v2/migration-example/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/README.md b/appengine/endpoints-frameworks-v2/migration-example/README.md index f378dd7bef7..6e7688535c7 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/README.md +++ b/appengine/endpoints-frameworks-v2/migration-example/README.md @@ -39,8 +39,8 @@ process is explained [here][8] and a quickstart is provided [here][9]. defined in either the Maven or Gradle build script. Hostname is used when a discovery document is generated. - - [Maven - pom.xml](pom.xml) - - [Gradle - build.gradle](build.gradle) + - [Maven - pom.xml](pom.xml#L101) + - [Gradle - build.gradle](build.gradle#L77) 1. [Optional]: User Authenticating with Google Accounts in Web Clients From 6f17fc4d077ac0cc345e27e5fa0f8791a9a57088 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 24 May 2017 11:36:48 -0700 Subject: [PATCH 5/7] s/GOOGLE_CLOUD_PROJECT/YOUR-PROJECT-ID/ --- appengine/endpoints-frameworks-v2/migration-example/README.md | 2 +- .../endpoints-frameworks-v2/migration-example/build.gradle | 2 +- appengine/endpoints-frameworks-v2/migration-example/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/README.md b/appengine/endpoints-frameworks-v2/migration-example/README.md index 6e7688535c7..0c1d570990a 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/README.md +++ b/appengine/endpoints-frameworks-v2/migration-example/README.md @@ -35,7 +35,7 @@ process is explained [here][8] and a quickstart is provided [here][9]. - [Google Cloud Endpoints Frameworks Gradle Plugin][11] ## Setup -1. Change `GOOGLE_CLOUD_PROJECT` with your project id in the hostname parameter +1. Change `YOUR-PROJECT-ID` with your project id in the hostname parameter defined in either the Maven or Gradle build script. Hostname is used when a discovery document is generated. diff --git a/appengine/endpoints-frameworks-v2/migration-example/build.gradle b/appengine/endpoints-frameworks-v2/migration-example/build.gradle index fe96308cf91..8c7c59e4865 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/build.gradle +++ b/appengine/endpoints-frameworks-v2/migration-example/build.gradle @@ -74,7 +74,7 @@ appengine { // App Engine tasks configuration // [START endpoints-server] endpointsServer { // Endpoints Framework Plugin server-side configuration - hostname = "GOOGLE_CLOUD_PROJECT.appspot.com" + hostname = "YOUR-PROJECT-ID.appspot.com" } // [END endpoints-server] diff --git a/appengine/endpoints-frameworks-v2/migration-example/pom.xml b/appengine/endpoints-frameworks-v2/migration-example/pom.xml index 94517223e8c..82cbee87f3f 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/pom.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/pom.xml @@ -98,7 +98,7 @@ limitations under the License. 1.0.0 - GOOGLE_CLOUD_PROJECT.appspot.com + YOUR-PROJECT-ID.appspot.com From 1047e7091e9753475a39410c6555803c6c120993 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 24 May 2017 14:26:55 -0700 Subject: [PATCH 6/7] Changing version number to + for build.gradle --- .../endpoints-frameworks-v2/migration-example/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/build.gradle b/appengine/endpoints-frameworks-v2/migration-example/build.gradle index 8c7c59e4865..895a2f22238 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/build.gradle +++ b/appengine/endpoints-frameworks-v2/migration-example/build.gradle @@ -20,10 +20,10 @@ buildscript { // Configuration for building } dependencies { // App Engine Gradle plugin - classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.1' + classpath 'com.google.cloud.tools:appengine-gradle-plugin:+' // Endpoints Frameworks Gradle plugin - classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0' + classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:+' } } // [END buildscript] From fecf30802be96a06e2e29d415a3962985611c0ba Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 24 May 2017 14:50:46 -0700 Subject: [PATCH 7/7] endpoints-framework-tools not needed only endpoints-framework --- .../endpoints-frameworks-v2/migration-example/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/build.gradle b/appengine/endpoints-frameworks-v2/migration-example/build.gradle index 895a2f22238..065ccd809be 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/build.gradle +++ b/appengine/endpoints-frameworks-v2/migration-example/build.gradle @@ -55,7 +55,7 @@ dependencies { // Endpoints Frameworks v2.0 // [START endpoints-tools] - compile group: 'com.google.endpoints', name: 'endpoints-framework-tools', version: '2.0.7' + compile group: 'com.google.endpoints', name: 'endpoints-framework', version: '2.0.7' // [END endpoints-tools] // End of Endpoints Frameworks v2.0 }