From 910aaf6460f44dd683c5cd11338986a0ccbf7c3f Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 27 Feb 2017 10:45:00 -0800 Subject: [PATCH 01/21] Moving endpoints discovery sample to migration-example --- .../{discovery => migration-example}/Jenkins.sh | 0 .../{discovery => migration-example}/README.md | 0 .../{discovery => migration-example}/build.gradle | 0 .../gradle/wrapper/gradle-wrapper.properties | 0 .../{discovery => migration-example}/gradlew | 0 .../{discovery => migration-example}/gradlew.bat | 0 .../{discovery => migration-example}/pom.xml | 0 .../src/main/java/com/example/helloendpoints/Constants.java | 0 .../src/main/java/com/example/helloendpoints/Greetings.java | 0 .../src/main/java/com/example/helloendpoints/HelloGreeting.java | 0 .../src/main/webapp/WEB-INF/appengine-web.xml | 0 .../src/main/webapp/WEB-INF/logging.properties | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../src/main/webapp/bootstrap/css/bootstrap-responsive.css | 0 .../src/main/webapp/bootstrap/css/bootstrap.css | 0 .../src/main/webapp/css/style.css | 0 .../{discovery => migration-example}/src/main/webapp/index.html | 0 .../{discovery => migration-example}/src/main/webapp/js/base.js | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/Jenkins.sh (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/README.md (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/build.gradle (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/gradle/wrapper/gradle-wrapper.properties (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/gradlew (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/gradlew.bat (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/pom.xml (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/src/main/java/com/example/helloendpoints/Constants.java (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/src/main/java/com/example/helloendpoints/Greetings.java (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/src/main/java/com/example/helloendpoints/HelloGreeting.java (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/src/main/webapp/WEB-INF/appengine-web.xml (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/src/main/webapp/WEB-INF/logging.properties (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/src/main/webapp/WEB-INF/web.xml (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/src/main/webapp/bootstrap/css/bootstrap-responsive.css (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/src/main/webapp/bootstrap/css/bootstrap.css (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/src/main/webapp/css/style.css (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/src/main/webapp/index.html (100%) rename appengine/endpoints-frameworks-v2/{discovery => migration-example}/src/main/webapp/js/base.js (100%) diff --git a/appengine/endpoints-frameworks-v2/discovery/Jenkins.sh b/appengine/endpoints-frameworks-v2/migration-example/Jenkins.sh similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/Jenkins.sh rename to appengine/endpoints-frameworks-v2/migration-example/Jenkins.sh diff --git a/appengine/endpoints-frameworks-v2/discovery/README.md b/appengine/endpoints-frameworks-v2/migration-example/README.md similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/README.md rename to appengine/endpoints-frameworks-v2/migration-example/README.md diff --git a/appengine/endpoints-frameworks-v2/discovery/build.gradle b/appengine/endpoints-frameworks-v2/migration-example/build.gradle similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/build.gradle rename to appengine/endpoints-frameworks-v2/migration-example/build.gradle diff --git a/appengine/endpoints-frameworks-v2/discovery/gradle/wrapper/gradle-wrapper.properties b/appengine/endpoints-frameworks-v2/migration-example/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/gradle/wrapper/gradle-wrapper.properties rename to appengine/endpoints-frameworks-v2/migration-example/gradle/wrapper/gradle-wrapper.properties diff --git a/appengine/endpoints-frameworks-v2/discovery/gradlew b/appengine/endpoints-frameworks-v2/migration-example/gradlew similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/gradlew rename to appengine/endpoints-frameworks-v2/migration-example/gradlew diff --git a/appengine/endpoints-frameworks-v2/discovery/gradlew.bat b/appengine/endpoints-frameworks-v2/migration-example/gradlew.bat similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/gradlew.bat rename to appengine/endpoints-frameworks-v2/migration-example/gradlew.bat diff --git a/appengine/endpoints-frameworks-v2/discovery/pom.xml b/appengine/endpoints-frameworks-v2/migration-example/pom.xml similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/pom.xml rename to appengine/endpoints-frameworks-v2/migration-example/pom.xml diff --git a/appengine/endpoints-frameworks-v2/discovery/src/main/java/com/example/helloendpoints/Constants.java b/appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Constants.java similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/src/main/java/com/example/helloendpoints/Constants.java rename to appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Constants.java diff --git a/appengine/endpoints-frameworks-v2/discovery/src/main/java/com/example/helloendpoints/Greetings.java b/appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Greetings.java similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/src/main/java/com/example/helloendpoints/Greetings.java rename to appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Greetings.java diff --git a/appengine/endpoints-frameworks-v2/discovery/src/main/java/com/example/helloendpoints/HelloGreeting.java b/appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/HelloGreeting.java similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/src/main/java/com/example/helloendpoints/HelloGreeting.java rename to appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/HelloGreeting.java diff --git a/appengine/endpoints-frameworks-v2/discovery/src/main/webapp/WEB-INF/appengine-web.xml b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/appengine-web.xml similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/src/main/webapp/WEB-INF/appengine-web.xml rename to appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/appengine-web.xml diff --git a/appengine/endpoints-frameworks-v2/discovery/src/main/webapp/WEB-INF/logging.properties b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/logging.properties similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/src/main/webapp/WEB-INF/logging.properties rename to appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/logging.properties diff --git a/appengine/endpoints-frameworks-v2/discovery/src/main/webapp/WEB-INF/web.xml b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/src/main/webapp/WEB-INF/web.xml rename to appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml diff --git a/appengine/endpoints-frameworks-v2/discovery/src/main/webapp/bootstrap/css/bootstrap-responsive.css b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/bootstrap/css/bootstrap-responsive.css similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/src/main/webapp/bootstrap/css/bootstrap-responsive.css rename to appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/bootstrap/css/bootstrap-responsive.css diff --git a/appengine/endpoints-frameworks-v2/discovery/src/main/webapp/bootstrap/css/bootstrap.css b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/bootstrap/css/bootstrap.css similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/src/main/webapp/bootstrap/css/bootstrap.css rename to appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/bootstrap/css/bootstrap.css diff --git a/appengine/endpoints-frameworks-v2/discovery/src/main/webapp/css/style.css b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/css/style.css similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/src/main/webapp/css/style.css rename to appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/css/style.css diff --git a/appengine/endpoints-frameworks-v2/discovery/src/main/webapp/index.html b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/index.html similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/src/main/webapp/index.html rename to appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/index.html diff --git a/appengine/endpoints-frameworks-v2/discovery/src/main/webapp/js/base.js b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/js/base.js similarity index 100% rename from appengine/endpoints-frameworks-v2/discovery/src/main/webapp/js/base.js rename to appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/js/base.js From 61710f5dc42c30956aafee6a22ab8f8abce8fd7a Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 27 Feb 2017 10:52:02 -0800 Subject: [PATCH 02/21] Updated Plugins to fix known bug and updated READMEs --- appengine/endpoints-frameworks-v2/README.md | 8 ++++---- .../migration-example/README.md | 8 +------- .../migration-example/pom.xml | 16 ++-------------- .../src/main/webapp/WEB-INF/appengine-web.xml | 1 - 4 files changed, 7 insertions(+), 26 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/README.md b/appengine/endpoints-frameworks-v2/README.md index 5f2c49d0d4d..97f20f51bfc 100644 --- a/appengine/endpoints-frameworks-v2/README.md +++ b/appengine/endpoints-frameworks-v2/README.md @@ -3,10 +3,10 @@ This directory contains Google Cloud Endpoints Frameworks for App Engine for App Engine Standard samples. The [`backend/`](backend/) directory contains the sample code for the [quickstart][4] for Cloud Endpoints Frameworks on App Engine -using an OpenAPI development process. The [`discovery/`](discovery/) directory -contains the sample code for [migrated][2] prior version of [Cloud Endpoints -Frameworks][1] project to the new [Cloud Endpoints Frameworks for App Engine][8] -using a discovery document development process. +using an OpenAPI development process. The [`migration-example/`](migration-example/) directory +contains the sample code for a [migrated][2] version of the [Cloud Endpoints +Frameworks][1] sample project to the new [Cloud Endpoints Frameworks for App Engine][8] +development process. The new Google Cloud Endpoints Frameworks for App Engine provides [additional functionality][3] using OpenAPI which may require payment. diff --git a/appengine/endpoints-frameworks-v2/migration-example/README.md b/appengine/endpoints-frameworks-v2/migration-example/README.md index 1f11fbb5c24..71034f6d5e7 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/README.md +++ b/appengine/endpoints-frameworks-v2/migration-example/README.md @@ -96,12 +96,6 @@ provided [here][9]. `gradle appengineDeploy` -## Known issues - -There's a [bug][13] where `1` is required in the -[appengine-web.xml](src/main/webapp/WEB-INF/appengine-web.xml) to run -this sample locally. This will become optional in the near future. - [1]: https://cloud.google.com/appengine/docs/java/ [2]: http://java.com/en/ @@ -115,4 +109,4 @@ this sample locally. This will become optional in the near future. [10]: https://github.com/GoogleCloudPlatform/endpoints-framework-maven-plugin [11]: https://github.com/GoogleCloudPlatform/endpoints-framework-gradle-plugin [12]: https://cloud.google.com/endpoints/docs/authenticating-users-frameworks -[13]: https://github.com/cloudendpoints/endpoints-java/issues/43 + diff --git a/appengine/endpoints-frameworks-v2/migration-example/pom.xml b/appengine/endpoints-frameworks-v2/migration-example/pom.xml index d62e5d0d164..9661f3cde3a 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/pom.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/pom.xml @@ -35,9 +35,9 @@ limitations under the License. 1.9.48 --> - 1.0.0 + 1.2.0 1.0.0-beta2 - 2.0.0-beta.12 + 2.0.3 1 1.7 1.7 @@ -95,18 +95,6 @@ limitations under the License. com.google.cloud.tools endpoints-framework-maven-plugin ${endpoints.maven.plugin.version} - - src/main/webapp - ${project.build.directory}/generated-sources/appengine-endpoints/WEB-INF - - - - generate-sources - - discoveryDocs - - - org.codehaus.mojo diff --git a/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/appengine-web.xml b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/appengine-web.xml index d0f24ab64f5..1d2a8f63b5b 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/appengine-web.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/appengine-web.xml @@ -16,7 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. --> true - 1 From c74c2547729fd1597bac6d7d7b6fc234490a1b3c Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 27 Feb 2017 13:21:39 -0800 Subject: [PATCH 03/21] Removed mentions of discovery doc from README --- .../migration-example/README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/README.md b/appengine/endpoints-frameworks-v2/migration-example/README.md index 71034f6d5e7..8a36a001faf 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/README.md +++ b/appengine/endpoints-frameworks-v2/migration-example/README.md @@ -1,11 +1,10 @@ # Hello World Google Cloud Endpoints for App Engine with a discovery document This sample provides an example of a [migration][7] from the prior version of -[Google Cloud Endpoints Frameworks][3] to new [Google Cloud Endpoints Frameworks for App Engine][8] -while still using a discovery document. This sample contains comments of how to -use the prior Endpoints Frameworks as well. For clarity, the prior Endpoints -Frameworks and the new Endpoints Frameworks are denoted as Endpoints Frameworks v1.0 -and Endpoints Frameworks v2.0 respectively. +[Google Cloud Endpoints Frameworks][3] to new [Google Cloud Endpoints Frameworks for App Engine][8]. +This sample contains comments of how to use the prior Endpoints Frameworks as well. +For clarity, the prior Endpoints Frameworks and the new Endpoints Frameworks are +denoted as Endpoints Frameworks v1.0 and Endpoints Frameworks v2.0 respectively. Google Cloud Endpoints Frameworks v2.0 provides new functionality which may require payment and uses an OpenAPI specification instead of the discovery document. @@ -46,7 +45,7 @@ provided [here][9]. - You can read more about different user authentication supported [here][12]. -1. [Optional]: Use Cloud Endpoints Frameworks v2.0 Maven and Gradle discovery and +1. [Optional]: Use Cloud Endpoints Frameworks v2.0 Maven and Gradle client library generation plugins with Cloud Endpoints Frameworks v1.0. - Uncomment `Endpoints Frameworks v1.0` sections and comment From 9c6b1be7efbd68a6e53208d0a7af3eab5639f099 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 27 Feb 2017 13:24:10 -0800 Subject: [PATCH 04/21] Removing mentions of iOS from sample --- appengine/endpoints-frameworks-v2/migration-example/README.md | 2 +- .../src/main/java/com/example/helloendpoints/Constants.java | 1 - .../src/main/java/com/example/helloendpoints/Greetings.java | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/README.md b/appengine/endpoints-frameworks-v2/migration-example/README.md index 8a36a001faf..9924f8cc648 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/README.md +++ b/appengine/endpoints-frameworks-v2/migration-example/README.md @@ -37,7 +37,7 @@ provided [here][9]. 1. [Optional]: User Authenticating with Google Accounts in other Applications Types - Inside [Constants.java](src/main/java/com/example/helloendpoints/Constants.java) you will find placeholders for Android - and iOS applications using Google Accounts client IDs registered in the + applications using Google Accounts client IDs registered in the [Credentials on Developers Console for OAuth 2.0 client IDs][6]. - These client IDs are used when defining annotation for this sample API found in [Greetings.java](src/main/java/com/example/helloendpoints/Greetings.java). diff --git a/appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Constants.java b/appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Constants.java index 255a3dd9e25..327b7e290ac 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Constants.java +++ b/appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Constants.java @@ -22,7 +22,6 @@ public class Constants { public static final String WEB_CLIENT_ID = "replace this with your web client ID"; public static final String ANDROID_CLIENT_ID = "replace this with your Android client ID"; - public static final String IOS_CLIENT_ID = "replace this with your iOS client ID"; public static final String ANDROID_AUDIENCE = WEB_CLIENT_ID; public static final String EMAIL_SCOPE = "https://www.googleapis.com/auth/userinfo.email"; diff --git a/appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Greetings.java b/appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Greetings.java index 11f533f622d..4bda5c883b4 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Greetings.java +++ b/appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Greetings.java @@ -35,7 +35,7 @@ @Api(name = "helloworld", version = "v1", scopes = {Constants.EMAIL_SCOPE}, - clientIds = {Constants.WEB_CLIENT_ID, Constants.ANDROID_CLIENT_ID, Constants.IOS_CLIENT_ID}, + clientIds = {Constants.WEB_CLIENT_ID, Constants.ANDROID_CLIENT_ID}, audiences = {Constants.ANDROID_AUDIENCE} ) public class Greetings { From a34b2d9fb9532518e25949331f29e276774f5eee Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 28 Feb 2017 01:33:40 -0800 Subject: [PATCH 05/21] Updating endpoints frameworks plugin version --- appengine/endpoints-frameworks-v2/migration-example/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/pom.xml b/appengine/endpoints-frameworks-v2/migration-example/pom.xml index 9661f3cde3a..5e88fa6878b 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/pom.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/pom.xml @@ -36,7 +36,7 @@ limitations under the License. --> 1.2.0 - 1.0.0-beta2 + 1.0.0-beta3 2.0.3 1 1.7 From b9f9d69b2f2526141df45e73ed5c35fe35a9d4e9 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 28 Feb 2017 22:43:02 -0800 Subject: [PATCH 06/21] Modified pom.xml and web.xml for docs --- .../migration-example/pom.xml | 30 +++++++------- .../src/main/webapp/WEB-INF/web.xml | 40 ++++++++++++------- 2 files changed, 42 insertions(+), 28 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/pom.xml b/appengine/endpoints-frameworks-v2/migration-example/pom.xml index 5e88fa6878b..75691067792 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/pom.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/pom.xml @@ -30,14 +30,6 @@ limitations under the License. - - - - 1.2.0 - 1.0.0-beta3 - 2.0.3 1 1.7 1.7 @@ -53,18 +45,24 @@ limitations under the License. - + 1.9.48 + + [END appengine-endpoints] + --> + com.google.endpoints endpoints-framework - ${endpoints.framework.version} + 2.0.3 + javax.servlet @@ -83,19 +81,23 @@ limitations under the License. ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + com.google.cloud.tools appengine-maven-plugin - ${appengine.maven.version} + 1.2.0 + + com.google.cloud.tools endpoints-framework-maven-plugin - ${endpoints.maven.plugin.version} + 1.0.0-beta3 + org.codehaus.mojo versions-maven-plugin diff --git a/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml index 4c0204393dd..be7073d2745 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml @@ -14,17 +14,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> + + - - - - EndpointsServlet - com.google.api.server.spi.EndpointsServlet - services com.example.helloendpoints.Greetings @@ -35,17 +30,34 @@ limitations under the License. - - - - + + [END appengine-endpoints] + --> + + + + + + EndpointsServlet + com.google.api.server.spi.EndpointsServlet + + services + com.example.helloendpoints.Greetings + + + restricted + false + + + EndpointsServlet /_ah/api/* - + + + index.html From 64387e651c79daf209329b6ee404595f81670867 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Fri, 10 Mar 2017 14:56:29 -0800 Subject: [PATCH 07/21] Lowercase J in Jenkins.sh --- .../migration-example/{Jenkins.sh => jenkins.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename appengine/endpoints-frameworks-v2/migration-example/{Jenkins.sh => jenkins.sh} (100%) diff --git a/appengine/endpoints-frameworks-v2/migration-example/Jenkins.sh b/appengine/endpoints-frameworks-v2/migration-example/jenkins.sh similarity index 100% rename from appengine/endpoints-frameworks-v2/migration-example/Jenkins.sh rename to appengine/endpoints-frameworks-v2/migration-example/jenkins.sh From 7f1fa4e61d18cb0521ae1cd53366e8993b37fcb0 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 13 Mar 2017 12:45:52 -0700 Subject: [PATCH 08/21] Updated README.md to reflect generated path and removed discovery --- .../migration-example/README.md | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/README.md b/appengine/endpoints-frameworks-v2/migration-example/README.md index 9924f8cc648..4506f685aae 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/README.md +++ b/appengine/endpoints-frameworks-v2/migration-example/README.md @@ -1,4 +1,4 @@ -# Hello World Google Cloud Endpoints for App Engine with a discovery document +# Hello World Google Cloud Endpoints for App Engine This sample provides an example of a [migration][7] from the prior version of [Google Cloud Endpoints Frameworks][3] to new [Google Cloud Endpoints Frameworks for App Engine][8]. @@ -7,7 +7,7 @@ For clarity, the prior Endpoints Frameworks and the new Endpoints Frameworks are denoted as Endpoints Frameworks v1.0 and Endpoints Frameworks v2.0 respectively. Google Cloud Endpoints Frameworks v2.0 provides new functionality which may -require payment and uses an OpenAPI specification instead of the discovery document. +require payment and uses an OpenAPI specification. The OpenAPI development process is explained [here][8] and a quickstart is provided [here][9]. @@ -61,37 +61,39 @@ provided [here][9]. ### Maven -1. Build a fresh binary with +1. Build a fresh binary by using: `mvn clean compile` -1. Run the application locally at [localhost:8080][5] with +1. Run the application locally at [localhost:8080][5] by using: `mvn appengine:run` -1. Generate the client library in a zip file named `helloworld-v1-java.zip` with +1. Generate the client library located at `target/client-libs/helloworld-v1-java.zip` + by using: `mvn endpoints-framework:clientLibs` -1. Deploy your application to Google App Engine with +1. Deploy your application to Google App Engine by using: `mvn appengine:deploy` ### Gradle -1. Build a fresh binary with +1. Build a fresh binary by using: `gradle clean compileJava` -1. Run the application locally at [localhost:8080][5] with +1. Run the application locally at [localhost:8080][5] by using: `gradle appengineRun` -1. Generate the client library in a zip file named `helloworld-v1-java.zip` with +1. Generate the client library located at `build/endpointsClientLibs/helloworld-v1-java.zip` + by using: `gradle endpointsClientLibs` -1. Deploy your application to Google App Engine with +1. Deploy your application to Google App Engine by using: `gradle appengineDeploy` From e7ad6178daf65d338a793ca822cf51adff667d3c Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 13 Mar 2017 13:38:21 -0700 Subject: [PATCH 09/21] Adding API explorer to README and fixed s/https/http/ --- .../migration-example/README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/README.md b/appengine/endpoints-frameworks-v2/migration-example/README.md index 4506f685aae..80d14296576 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/README.md +++ b/appengine/endpoints-frameworks-v2/migration-example/README.md @@ -65,10 +65,14 @@ provided [here][9]. `mvn clean compile` -1. Run the application locally at [localhost:8080][5] by using: +1. Run the application locally at [http://localhost:8080][5] by using: `mvn appengine:run` +1. Explore local server's API explorer by browsing to: + + [http://localhost:8080/_ah/api/explorer][13] + 1. Generate the client library located at `target/client-libs/helloworld-v1-java.zip` by using: @@ -84,10 +88,14 @@ provided [here][9]. `gradle clean compileJava` -1. Run the application locally at [localhost:8080][5] by using: +1. Run the application locally at [http://localhost:8080][5] by using: `gradle appengineRun` +1. Explore local server's API explorer by browsing to: + + [http://localhost:8080/_ah/api/explorer][13] + 1. Generate the client library located at `build/endpointsClientLibs/helloworld-v1-java.zip` by using: @@ -102,7 +110,7 @@ provided [here][9]. [2]: http://java.com/en/ [3]: https://cloud.google.com/appengine/docs/java/endpoints/ [4]: https://cloud.google.com/appengine/docs/java/tools/maven -[5]: https://localhost:8080/ +[5]: http://localhost:8080/ [6]: https://console.developers.google.com/project/_/apiui/credential [7]: https://cloud.google.com/appengine/docs/java/endpoints/migrating [8]: https://cloud.google.com/endpoints/docs/frameworks/java/about-cloud-endpoints-frameworks @@ -110,4 +118,4 @@ provided [here][9]. [10]: https://github.com/GoogleCloudPlatform/endpoints-framework-maven-plugin [11]: https://github.com/GoogleCloudPlatform/endpoints-framework-gradle-plugin [12]: https://cloud.google.com/endpoints/docs/authenticating-users-frameworks - +[13]: http://localhost:8080/_ah/api/explorer From 09c91c09152993dc19ea3992100c765819d03eef Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 13 Mar 2017 15:19:58 -0700 Subject: [PATCH 10/21] Fixing typo: missing ']' --- appengine/endpoints-frameworks-v2/migration-example/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/pom.xml b/appengine/endpoints-frameworks-v2/migration-example/pom.xml index 75691067792..60e43c784a9 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/pom.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/pom.xml @@ -91,13 +91,13 @@ limitations under the License. - + com.google.cloud.tools endpoints-framework-maven-plugin 1.0.0-beta3 - + org.codehaus.mojo versions-maven-plugin From 1fa61281d519442f9fc3533e1c157321c330a6ce Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 13 Mar 2017 15:22:03 -0700 Subject: [PATCH 11/21] Fix typo: missing e in appengine --- appengine/endpoints-frameworks-v2/migration-example/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/pom.xml b/appengine/endpoints-frameworks-v2/migration-example/pom.xml index 60e43c784a9..f1b1decb407 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/pom.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/pom.xml @@ -90,7 +90,7 @@ limitations under the License. - + com.google.cloud.tools From ee2ee14d658f66e77afc4c58fa3b684c9a116334 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 13 Mar 2017 22:55:18 -0700 Subject: [PATCH 12/21] Added configuration to endpoints-framework-plugin in pom.xml --- appengine/endpoints-frameworks-v2/migration-example/pom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appengine/endpoints-frameworks-v2/migration-example/pom.xml b/appengine/endpoints-frameworks-v2/migration-example/pom.xml index f1b1decb407..057c2b8a1bb 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/pom.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/pom.xml @@ -96,6 +96,9 @@ limitations under the License. com.google.cloud.tools endpoints-framework-maven-plugin 1.0.0-beta3 + + + From 741bf748dc1f575b2b77deff449917bd211ae837 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 14 Mar 2017 00:46:42 -0700 Subject: [PATCH 13/21] Updated version in pom.xml and set versions for build.gradle --- .../migration-example/build.gradle | 10 +++++----- .../endpoints-frameworks-v2/migration-example/pom.xml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/build.gradle b/appengine/endpoints-frameworks-v2/migration-example/build.gradle index 47af6be51ad..110ee930f48 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/build.gradle +++ b/appengine/endpoints-frameworks-v2/migration-example/build.gradle @@ -18,8 +18,8 @@ buildscript { // Configuration for building jcenter() // Bintray's repository - a fast Maven Central mirror & more } dependencies { - classpath 'com.google.cloud.tools:appengine-gradle-plugin:+' // latest App Engine Gradle tasks - classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:+' + classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.1.0' + classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0-beta6' } } @@ -43,7 +43,7 @@ dependencies { // End of Endpoints Frameworks v1.0 // Endpoints Frameworks v2.0 - compile "com.google.endpoints:endpoints-framework:+" + compile group: 'com.google.endpoints', name: 'endpoints-framework-tools', version: '2.0.4' // End of Endpoints Frameworks v2.0 } @@ -57,8 +57,8 @@ appengine { // App Engine tasks configuration } } -group = "com.example.helloendpoints" // Generated output GroupId -version = "1" // Version in generated output +group = 'com.example.helloendpoints' // Generated output GroupId +version = '1' // Version in generated output sourceCompatibility = 1.7 // App Engine Standard uses Java 7 targetCompatibility = 1.7 // App Engine Standard uses Java 7 diff --git a/appengine/endpoints-frameworks-v2/migration-example/pom.xml b/appengine/endpoints-frameworks-v2/migration-example/pom.xml index 057c2b8a1bb..a22c461b7ee 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/pom.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/pom.xml @@ -60,7 +60,7 @@ limitations under the License. com.google.endpoints endpoints-framework - 2.0.3 + 2.0.4 From a74aa1f7919add1260827c5ccd7a2d5b453baaff Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 14 Mar 2017 10:08:39 -0700 Subject: [PATCH 14/21] Updating App Engine Maven plugin version --- appengine/endpoints-frameworks-v2/migration-example/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/pom.xml b/appengine/endpoints-frameworks-v2/migration-example/pom.xml index a22c461b7ee..6112d4fd48e 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/pom.xml +++ b/appengine/endpoints-frameworks-v2/migration-example/pom.xml @@ -85,7 +85,7 @@ limitations under the License. com.google.cloud.tools appengine-maven-plugin - 1.2.0 + 1.2.1 From e373132fd6e2c53c715ff5edcd38ba2b89388283 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 15 Mar 2017 10:42:13 -0700 Subject: [PATCH 15/21] Fixed formatted the migration-example/README.md --- .../migration-example/README.md | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/README.md b/appengine/endpoints-frameworks-v2/migration-example/README.md index 80d14296576..b9357a8af1c 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/README.md +++ b/appengine/endpoints-frameworks-v2/migration-example/README.md @@ -2,14 +2,14 @@ This sample provides an example of a [migration][7] from the prior version of [Google Cloud Endpoints Frameworks][3] to new [Google Cloud Endpoints Frameworks for App Engine][8]. -This sample contains comments of how to use the prior Endpoints Frameworks as well. -For clarity, the prior Endpoints Frameworks and the new Endpoints Frameworks are -denoted as Endpoints Frameworks v1.0 and Endpoints Frameworks v2.0 respectively. +This sample contains comments of how to use the prior Endpoints Frameworks as +well. For clarity, the prior Endpoints Frameworks and the new Endpoints +Frameworks are denoted as Endpoints Frameworks v1.0 and Endpoints Frameworks +v2.0, respectively. Google Cloud Endpoints Frameworks v2.0 provides new functionality which may -require payment and uses an OpenAPI specification. -The OpenAPI development process is explained [here][8] and a quickstart is -provided [here][9]. +require payment and uses an OpenAPI specification. The OpenAPI development +process is explained [here][8] and a quickstart is provided [here][9]. ## Products - [Google App Engine Standard][1] @@ -29,10 +29,13 @@ provided [here][9]. 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) - to reflect the web client ID you have registered in the [Credentials on Developers Console for OAuth 2.0 client IDs][6]. + to reflect the web client ID you have registered in the + [Credentials on Developers Console for OAuth 2.0 client IDs][6]. - 1. Update the value of `google.devrel.samples.helloendpoints.CLIENT_ID` in [base.js](src/main/webapp/js/base.js) - to reflect the web client ID you have registered in the [Credentials on Developers Console for OAuth 2.0 client IDs][6]. + 1. Update the value of `google.devrel.samples.helloendpoints.CLIENT_ID` in + [base.js](src/main/webapp/js/base.js) to reflect the web client ID you + have registered in the + [Credentials on Developers Console for OAuth 2.0 client IDs][6]. 1. [Optional]: User Authenticating with Google Accounts in other Applications Types @@ -40,7 +43,8 @@ provided [here][9]. applications using Google Accounts client IDs registered in the [Credentials on Developers Console for OAuth 2.0 client IDs][6]. - - These client IDs are used when defining annotation for this sample API found in [Greetings.java](src/main/java/com/example/helloendpoints/Greetings.java). + - These client IDs are used when defining annotation for this sample API + found in [Greetings.java](src/main/java/com/example/helloendpoints/Greetings.java). - You can read more about different user authentication supported [here][12]. From 252139d60cc72d9153d306ecbde16dfe8a6170be Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 22 Mar 2017 15:42:05 -0700 Subject: [PATCH 16/21] Adding region tags to build.gradle --- .../migration-example/build.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/appengine/endpoints-frameworks-v2/migration-example/build.gradle b/appengine/endpoints-frameworks-v2/migration-example/build.gradle index 31df4b3af4d..32b2ae2c4e2 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/build.gradle +++ b/appengine/endpoints-frameworks-v2/migration-example/build.gradle @@ -12,16 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +// [START buildscript] buildscript { // Configuration for building repositories { mavenCentral() jcenter() // Bintray's repository - a fast Maven Central mirror & more } dependencies { + // App Engine Gradle plugin classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.1.0' + + // Endpoints Frameworks Gradle plugin classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0-beta6' } } +// [END buildscript] repositories { // repositories for Jar's you access in your code mavenCentral() @@ -30,8 +35,14 @@ repositories { // repositories for Jar's you access in your code apply plugin: 'java' // standard Java tasks apply plugin: 'war' // standard Web Archive plugin + +// [START apply_appengine] apply plugin: 'com.google.cloud.tools.appengine' // App Engine tasks +// [END apply_appengine] + +// [START apply_endpoints-framework-server] apply plugin: 'com.google.cloud.tools.endpoints-framework-server' +// [END apply_endpoints-framework-server] dependencies { providedCompile group: 'javax.servlet', name: 'servlet-api', version:'2.5' @@ -43,7 +54,9 @@ dependencies { // End of Endpoints Frameworks v1.0 // Endpoints Frameworks v2.0 + // [START endpoints-tools] compile group: 'com.google.endpoints', name: 'endpoints-framework-tools', version: '2.0.4' + // [END endpoints-tools] // End of Endpoints Frameworks v2.0 } @@ -58,6 +71,7 @@ appengine { // App Engine tasks configuration } } + group = 'com.example.helloendpoints' // Generated output GroupId version = '1' // Version in generated output From 66119b6a5063955b2131bcd41caa44d4cda40add Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 22 Mar 2017 16:44:44 -0700 Subject: [PATCH 17/21] Adding endpoints frameworks plugin build.gradle comments --- .../migration-example/build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/appengine/endpoints-frameworks-v2/migration-example/build.gradle b/appengine/endpoints-frameworks-v2/migration-example/build.gradle index 32b2ae2c4e2..e3615c85bb6 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/build.gradle +++ b/appengine/endpoints-frameworks-v2/migration-example/build.gradle @@ -71,6 +71,15 @@ appengine { // App Engine tasks configuration } } +/* START endpoints-server] +endpointsServer { + // Endpoints Framework Plugin server-side configuration +} + +endpointsClient { + // Endpoints Framework Plugin client-side configuration +} +[END endpoints-server] */ group = 'com.example.helloendpoints' // Generated output GroupId version = '1' // Version in generated output From 253b125530dd197f4b2e9d8b3ec968a32e2f9a4b Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 22 Mar 2017 16:50:01 -0700 Subject: [PATCH 18/21] Fixing typo in region tag --- .../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 e3615c85bb6..6eb723bfb77 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/build.gradle +++ b/appengine/endpoints-frameworks-v2/migration-example/build.gradle @@ -71,7 +71,7 @@ appengine { // App Engine tasks configuration } } -/* START endpoints-server] +/* [START endpoints-server] endpointsServer { // Endpoints Framework Plugin server-side configuration } From 85665182cbcc5132d82ac26b863a59fad8fd7e03 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Wed, 22 Mar 2017 16:55:31 -0700 Subject: [PATCH 19/21] Split endpointsServer and endpointsClient region tags --- .../endpoints-frameworks-v2/migration-example/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/build.gradle b/appengine/endpoints-frameworks-v2/migration-example/build.gradle index 6eb723bfb77..c2bc36e9ddd 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/build.gradle +++ b/appengine/endpoints-frameworks-v2/migration-example/build.gradle @@ -75,11 +75,13 @@ appengine { // App Engine tasks configuration endpointsServer { // Endpoints Framework Plugin server-side configuration } +[END endpoints-server] */ +/* [START endpoints-client] endpointsClient { // Endpoints Framework Plugin client-side configuration } -[END endpoints-server] */ +[END endpoints-client] */ group = 'com.example.helloendpoints' // Generated output GroupId version = '1' // Version in generated output From 7ef7d532ce25ea43b4f04c3d2d9397b75427fad4 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Thu, 23 Mar 2017 15:50:43 -0700 Subject: [PATCH 20/21] Removing endpointsClient closure. --- .../endpoints-frameworks-v2/migration-example/build.gradle | 6 ------ 1 file changed, 6 deletions(-) diff --git a/appengine/endpoints-frameworks-v2/migration-example/build.gradle b/appengine/endpoints-frameworks-v2/migration-example/build.gradle index c2bc36e9ddd..ef40afaeaf8 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/build.gradle +++ b/appengine/endpoints-frameworks-v2/migration-example/build.gradle @@ -77,12 +77,6 @@ endpointsServer { } [END endpoints-server] */ -/* [START endpoints-client] -endpointsClient { - // Endpoints Framework Plugin client-side configuration -} -[END endpoints-client] */ - group = 'com.example.helloendpoints' // Generated output GroupId version = '1' // Version in generated output From f5a83b8385047ebbdb55cf638a01f93328cd6d0e Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 27 Mar 2017 15:22:25 -0700 Subject: [PATCH 21/21] Update version number of app-gradle-plugin --- .../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 ef40afaeaf8..3f84099aa7d 100644 --- a/appengine/endpoints-frameworks-v2/migration-example/build.gradle +++ b/appengine/endpoints-frameworks-v2/migration-example/build.gradle @@ -20,7 +20,7 @@ buildscript { // Configuration for building } dependencies { // App Engine Gradle plugin - classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.1.0' + classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.1.1' // Endpoints Frameworks Gradle plugin classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0-beta6'