From 006b1cf90ade38ef965b361f8305c0a8021ae155 Mon Sep 17 00:00:00 2001 From: Les Vogel Date: Thu, 18 May 2017 18:16:53 -0700 Subject: [PATCH 1/4] web.xml and Annotations 1. Upgrade all web.xml to 3.1 2. Add annotations 3. Hello World is old, remove this one. --- .../appengine/analytics/AnalyticsServlet.java | 2 + .../analytics/src/main/webapp/WEB-INF/web.xml | 19 +++---- .../appidentity/IdentityServlet.java | 2 + .../appidentity/SignForAppServlet.java | 7 +-- .../appidentity/UrlShortenerServlet.java | 2 + .../src/main/webapp/WEB-INF/web.xml | 35 +++--------- .../bigtable/src/main/webapp/WEB-INF/web.xml | 2 +- .../main/webapp/{index.jsp => bigtable.jsp} | 0 .../appengine/cloudsql/CloudSqlServlet.java | 2 + .../cloudsql/src/main/webapp/WEB-INF/web.xml | 20 +++---- .../src/main/webapp/WEB-INF/web.xml | 9 ++-- .../src/main/webapp/WEB-INF/web.xml | 9 ++-- .../indexes/src/main/webapp/WEB-INF/web.xml | 9 ++-- .../datastore/src/main/webapp/WEB-INF/web.xml | 9 ++-- .../backend/src/main/webapp/WEB-INF/web.xml | 6 ++- .../src/main/webapp/WEB-INF/web.xml | 7 ++- .../src/main/webapp/WEB-INF/web.xml | 7 +-- .../src/main/webapp/WEB-INF/web.xml | 9 ++-- .../src/main/webapp/WEB-INF/web.xml | 22 ++++++-- .../src/main/webapp/WEB-INF/web.xml | 22 ++++++-- appengine-java8/helloworld/README.md | 18 ------- appengine-java8/helloworld/jenkins.sh | 21 -------- appengine-java8/helloworld/pom.xml | 54 ------------------- .../appengine/helloworld/HelloServlet.java | 36 ------------- .../src/main/webapp/WEB-INF/appengine-web.xml | 19 ------- .../src/main/webapp/WEB-INF/web.xml | 14 ----- .../images/src/main/webapp/WEB-INF/web.xml | 24 +++++++-- .../logs/src/main/webapp/WEB-INF/web.xml | 34 ++++++------ .../mail/src/main/webapp/WEB-INF/web.xml | 32 ++++++----- .../mailgun/src/main/webapp/WEB-INF/web.xml | 34 ++++++------ .../mailjet/src/main/webapp/WEB-INF/web.xml | 34 ++++++------ .../memcache/src/main/webapp/WEB-INF/web.xml | 34 ++++++------ .../src/main/webapp/WEB-INF/web.xml | 23 ++++++-- .../oauth2/src/main/webapp/WEB-INF/web.xml | 24 +++++++-- appengine-java8/pom.xml | 2 - .../src/main/webapp/WEB-INF/web.xml | 34 ++++++------ .../requests/src/main/webapp/WEB-INF/web.xml | 24 +++++++-- appengine-java8/search/pom.xml | 2 - .../search/src/main/webapp/WEB-INF/web.xml | 24 +++++++-- .../sendgrid/src/main/webapp/WEB-INF/web.xml | 34 ++++++------ .../deferred/src/main/webapp/WEB-INF/web.xml | 30 +++++------ .../pull/src/main/webapp/WEB-INF/web.xml | 34 ++++++------ .../push/src/main/webapp/WEB-INF/web.xml | 10 ++-- .../twilio/src/main/webapp/WEB-INF/web.xml | 34 ++++++------ .../unittests/src/main/webapp/WEB-INF/web.xml | 7 --- .../example/appengine/UrlFetchServlet.java | 10 ++-- .../urlfetch/src/main/webapp/WEB-INF/web.xml | 35 +++++++----- .../webapp/{main.jsp => urlfetchresult.jsp} | 0 .../example/appengine/users/UsersServlet.java | 2 + .../users/src/main/webapp/WEB-INF/web.xml | 35 +++++++----- 50 files changed, 450 insertions(+), 468 deletions(-) rename appengine-java8/bigtable/src/main/webapp/{index.jsp => bigtable.jsp} (100%) delete mode 100644 appengine-java8/helloworld/README.md delete mode 100644 appengine-java8/helloworld/jenkins.sh delete mode 100644 appengine-java8/helloworld/pom.xml delete mode 100644 appengine-java8/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java delete mode 100644 appengine-java8/helloworld/src/main/webapp/WEB-INF/appengine-web.xml delete mode 100644 appengine-java8/helloworld/src/main/webapp/WEB-INF/web.xml delete mode 100644 appengine-java8/unittests/src/main/webapp/WEB-INF/web.xml rename appengine-java8/urlfetch/src/main/webapp/{main.jsp => urlfetchresult.jsp} (100%) diff --git a/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java b/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java index 4fd2d6186b6..73ec6057c17 100644 --- a/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java +++ b/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java @@ -19,6 +19,7 @@ import com.google.appengine.api.urlfetch.URLFetchService; import com.google.appengine.api.urlfetch.URLFetchServiceFactory; +import javax.servlet.annotation.WebServlet; import org.apache.http.client.utils.URIBuilder; import java.io.IOException; @@ -33,6 +34,7 @@ // [START example] @SuppressWarnings("serial") +@WebServlet(name="analytics", description = "Analytics: Send Analytics Event to Google Analytics", urlPatterns = "/analytics") public class AnalyticsServlet extends HttpServlet { @Override diff --git a/appengine-java8/analytics/src/main/webapp/WEB-INF/web.xml b/appengine-java8/analytics/src/main/webapp/WEB-INF/web.xml index cb3033ed531..074cd62c393 100644 --- a/appengine-java8/analytics/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/analytics/src/main/webapp/WEB-INF/web.xml @@ -13,17 +13,12 @@ limitations under the License. --> - - - analytics - com.example.appengine.analytics.AnalyticsServlet - - - analytics - / - + + + analytics + diff --git a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java index d9d72a704c9..a1e8d2efa30 100644 --- a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java +++ b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java @@ -20,11 +20,13 @@ import java.io.IOException; +import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") +@WebServlet(name="appidentity", description = "AppIdentity: Get the Host Name", urlPatterns = "/appidentity/identity") public class IdentityServlet extends HttpServlet { // [START versioned_hostnames] diff --git a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java index 3a9df0301fe..99c41200e1e 100644 --- a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java +++ b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java @@ -19,7 +19,6 @@ import com.google.appengine.api.appidentity.AppIdentityService; import com.google.appengine.api.appidentity.AppIdentityServiceFactory; import com.google.appengine.api.appidentity.PublicCertificate; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; @@ -33,13 +32,15 @@ import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.util.Arrays; +import java.util.Calendar; import java.util.Collection; - +import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") +@WebServlet(name="signforapp", description = "AppIdentity: Sign 'abcdefg'", urlPatterns = "/appidentity/sign") public class SignForAppServlet extends HttpServlet { private final AppIdentityService appIdentity; @@ -81,7 +82,7 @@ private String simulateIdentityAssertion() throws CertificateException, UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException, SignatureException { // Simulate the sending app. - String message = "abcdefg"; + String message = "abcdefg "+ Calendar.getInstance().getTime().toString(); byte[] blob = message.getBytes(); byte[] blobSignature = signBlob(blob); byte[] publicCert = getPublicCertificate(); diff --git a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java index 324b8dcd0a1..cf4c608c5b6 100644 --- a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java +++ b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java @@ -19,11 +19,13 @@ import java.io.IOException; import java.io.PrintWriter; +import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") +@WebServlet(name="UrlShortener", description = "AppIdentity: Url Shortener", urlPatterns = "/appidentity/shorten") public class UrlShortenerServlet extends HttpServlet { private final UrlShortener shortener; diff --git a/appengine-java8/appidentity/src/main/webapp/WEB-INF/web.xml b/appengine-java8/appidentity/src/main/webapp/WEB-INF/web.xml index 3296a0799f4..d07ac01365d 100644 --- a/appengine-java8/appidentity/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/appidentity/src/main/webapp/WEB-INF/web.xml @@ -1,30 +1,9 @@ - - - appidentity - com.example.appengine.appidentity.IdentityServlet - - - signforapp - com.example.appengine.appidentity.SignForAppServlet - - - urlshortener - com.example.appengine.appidentity.UrlShortenerServlet - - - appidentity - / - - - signforapp - /sign - - - urlshortener - /shorten - + + + appidentity/identity + diff --git a/appengine-java8/bigtable/src/main/webapp/WEB-INF/web.xml b/appengine-java8/bigtable/src/main/webapp/WEB-INF/web.xml index 66495223908..a830b6cf933 100644 --- a/appengine-java8/bigtable/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/bigtable/src/main/webapp/WEB-INF/web.xml @@ -21,7 +21,7 @@ limitations under the License. version="3.1"> - index.jsp + bigtable.jsp BIGTABLE_PROJECT diff --git a/appengine-java8/bigtable/src/main/webapp/index.jsp b/appengine-java8/bigtable/src/main/webapp/bigtable.jsp similarity index 100% rename from appengine-java8/bigtable/src/main/webapp/index.jsp rename to appengine-java8/bigtable/src/main/webapp/bigtable.jsp diff --git a/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java b/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java index 9e09fbede8e..87310c93f73 100644 --- a/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java +++ b/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java @@ -30,12 +30,14 @@ import java.util.Date; import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; // [START example] @SuppressWarnings("serial") +@WebServlet(name="CloudSQL", description = "CloudSQL: Write low order IP address to Cloud SQL", urlPatterns = "/cloudsql") public class CloudSqlServlet extends HttpServlet { @Override diff --git a/appengine-java8/cloudsql/src/main/webapp/WEB-INF/web.xml b/appengine-java8/cloudsql/src/main/webapp/WEB-INF/web.xml index 2f5b0dfbd32..11d86d4034b 100644 --- a/appengine-java8/cloudsql/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/cloudsql/src/main/webapp/WEB-INF/web.xml @@ -13,16 +13,12 @@ limitations under the License. --> - - - cloudsql - com.example.appengine.cloudsql.CloudSqlServlet - - - cloudsql - / - + + + cloudsql + diff --git a/appengine-java8/datastore/indexes-exploding/src/main/webapp/WEB-INF/web.xml b/appengine-java8/datastore/indexes-exploding/src/main/webapp/WEB-INF/web.xml index 6af27edbd87..0be42c36f0c 100644 --- a/appengine-java8/datastore/indexes-exploding/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/datastore/indexes-exploding/src/main/webapp/WEB-INF/web.xml @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - + indexes-servlet com.example.appengine.IndexesServlet diff --git a/appengine-java8/datastore/indexes-perfect/src/main/webapp/WEB-INF/web.xml b/appengine-java8/datastore/indexes-perfect/src/main/webapp/WEB-INF/web.xml index 6af27edbd87..0be42c36f0c 100644 --- a/appengine-java8/datastore/indexes-perfect/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/datastore/indexes-perfect/src/main/webapp/WEB-INF/web.xml @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - + indexes-servlet com.example.appengine.IndexesServlet diff --git a/appengine-java8/datastore/indexes/src/main/webapp/WEB-INF/web.xml b/appengine-java8/datastore/indexes/src/main/webapp/WEB-INF/web.xml index 6af27edbd87..0be42c36f0c 100644 --- a/appengine-java8/datastore/indexes/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/datastore/indexes/src/main/webapp/WEB-INF/web.xml @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - + indexes-servlet com.example.appengine.IndexesServlet diff --git a/appengine-java8/datastore/src/main/webapp/WEB-INF/web.xml b/appengine-java8/datastore/src/main/webapp/WEB-INF/web.xml index cf06f60d61e..6b22f8fbe65 100644 --- a/appengine-java8/datastore/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/datastore/src/main/webapp/WEB-INF/web.xml @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - + guestbook-strong com.example.appengine.GuestbookStrongServlet diff --git a/appengine-java8/endpoints-frameworks-v2/backend/src/main/webapp/WEB-INF/web.xml b/appengine-java8/endpoints-frameworks-v2/backend/src/main/webapp/WEB-INF/web.xml index f8d1d03f98a..78661fb5d0a 100644 --- a/appengine-java8/endpoints-frameworks-v2/backend/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/endpoints-frameworks-v2/backend/src/main/webapp/WEB-INF/web.xml @@ -14,7 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - + EndpointsServlet diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml b/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml index be7073d2745..7f42fd562d4 100644 --- a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml @@ -1,4 +1,4 @@ - + + - + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee + http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" + version="3.1"> com.example.gaefirebaseeventproxy.ServletContextListenerImpl diff --git a/appengine-java8/firebase-tictactoe/src/main/webapp/WEB-INF/web.xml b/appengine-java8/firebase-tictactoe/src/main/webapp/WEB-INF/web.xml index 772f32fc601..7bb9e2669cf 100644 --- a/appengine-java8/firebase-tictactoe/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/firebase-tictactoe/src/main/webapp/WEB-INF/web.xml @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. --> - + index diff --git a/appengine-java8/guestbook-cloud-datastore/src/main/webapp/WEB-INF/web.xml b/appengine-java8/guestbook-cloud-datastore/src/main/webapp/WEB-INF/web.xml index 110a5c42fbc..112b096897c 100644 --- a/appengine-java8/guestbook-cloud-datastore/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/guestbook-cloud-datastore/src/main/webapp/WEB-INF/web.xml @@ -1,8 +1,24 @@ - + + sign diff --git a/appengine-java8/guestbook-objectify/src/main/webapp/WEB-INF/web.xml b/appengine-java8/guestbook-objectify/src/main/webapp/WEB-INF/web.xml index d5a23626f0c..9f0f9d72568 100644 --- a/appengine-java8/guestbook-objectify/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/guestbook-objectify/src/main/webapp/WEB-INF/web.xml @@ -1,8 +1,24 @@ - + + sign diff --git a/appengine-java8/helloworld/README.md b/appengine-java8/helloworld/README.md deleted file mode 100644 index 204ac802e96..00000000000 --- a/appengine-java8/helloworld/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Google App Engine Standard Environment Hello World Sample - -This sample demonstrates how to deploy an application on Google App Engine. - -See the [Google App Engine standard environment documentation][ae-docs] for more -detailed instructions. - -[ae-docs]: https://cloud.google.com/appengine/docs/java/ - -## Setup - - gcloud init - -## Running locally - $ mvn appengine:run - -## Deploying - $ mvn appengine:deploy diff --git a/appengine-java8/helloworld/jenkins.sh b/appengine-java8/helloworld/jenkins.sh deleted file mode 100644 index 22dfb5b12f4..00000000000 --- a/appengine-java8/helloworld/jenkins.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# 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. - -set -xe - -mvn clean appengine:deploy -DskipTests=true - -curl -f "http://${GOOGLE_VERSION_ID}-dot-${GOOGLE_PROJECT_ID}.appspot.com/" diff --git a/appengine-java8/helloworld/pom.xml b/appengine-java8/helloworld/pom.xml deleted file mode 100644 index ad046383886..00000000000 --- a/appengine-java8/helloworld/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - 4.0.0 - war - 1.0-SNAPSHOT - com.example.appengine - appengine-helloworld-j8 - - com.google.cloud - appengine-java8-samples - 1.0.0 - .. - - - - javax.servlet - javax.servlet-api - 3.1.0 - jar - provided - - - - - ${project.build.directory}/${project.build.finalName}/WEB-INF/classes - - - com.google.cloud.tools - appengine-maven-plugin - 1.3.1 - - true - true - - - - - - diff --git a/appengine-java8/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java b/appengine-java8/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java deleted file mode 100644 index 5868bf82f9d..00000000000 --- a/appengine-java8/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright 2015 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.example.appengine.helloworld; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -// [START example] -@SuppressWarnings("serial") -public class HelloServlet extends HttpServlet { - - @Override - public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { - PrintWriter out = resp.getWriter(); - out.println("Hello, world"); - } -} -// [END example] diff --git a/appengine-java8/helloworld/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/helloworld/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index 1f8086c81f4..00000000000 --- a/appengine-java8/helloworld/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - java8 - true - - diff --git a/appengine-java8/helloworld/src/main/webapp/WEB-INF/web.xml b/appengine-java8/helloworld/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 1a1704104a2..00000000000 --- a/appengine-java8/helloworld/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - hello - com.example.appengine.helloworld.HelloServlet - - - hello - / - - diff --git a/appengine-java8/images/src/main/webapp/WEB-INF/web.xml b/appengine-java8/images/src/main/webapp/WEB-INF/web.xml index 8ccba622877..3ab41c29a64 100644 --- a/appengine-java8/images/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/images/src/main/webapp/WEB-INF/web.xml @@ -1,8 +1,24 @@ - + + images com.example.appengine.images.ImagesServlet diff --git a/appengine-java8/logs/src/main/webapp/WEB-INF/web.xml b/appengine-java8/logs/src/main/webapp/WEB-INF/web.xml index 3b156c9b98c..5f039c7d869 100644 --- a/appengine-java8/logs/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/logs/src/main/webapp/WEB-INF/web.xml @@ -1,22 +1,24 @@ - - - + logs com.example.appengine.logs.LogsServlet diff --git a/appengine-java8/mail/src/main/webapp/WEB-INF/web.xml b/appengine-java8/mail/src/main/webapp/WEB-INF/web.xml index 393f67066ad..5fa0893782a 100644 --- a/appengine-java8/mail/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/mail/src/main/webapp/WEB-INF/web.xml @@ -1,20 +1,24 @@ - + mail com.example.appengine.mail.MailServlet diff --git a/appengine-java8/mailgun/src/main/webapp/WEB-INF/web.xml b/appengine-java8/mailgun/src/main/webapp/WEB-INF/web.xml index 9f22b168016..e43d571462f 100644 --- a/appengine-java8/mailgun/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/mailgun/src/main/webapp/WEB-INF/web.xml @@ -1,22 +1,24 @@ - - - + mailgun com.example.appengine.mailgun.MailgunServlet diff --git a/appengine-java8/mailjet/src/main/webapp/WEB-INF/web.xml b/appengine-java8/mailjet/src/main/webapp/WEB-INF/web.xml index 9d906fce8f8..0c196aef5e4 100644 --- a/appengine-java8/mailjet/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/mailjet/src/main/webapp/WEB-INF/web.xml @@ -1,22 +1,24 @@ - - - + mailjet com.example.appengine.mailjet.MailjetServlet diff --git a/appengine-java8/memcache/src/main/webapp/WEB-INF/web.xml b/appengine-java8/memcache/src/main/webapp/WEB-INF/web.xml index d4a7e38c981..afbd918d067 100644 --- a/appengine-java8/memcache/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/memcache/src/main/webapp/WEB-INF/web.xml @@ -1,22 +1,24 @@ - - - + memcache-best-practice com.example.appengine.memcache.MemcacheBestPracticeServlet diff --git a/appengine-java8/multitenancy/src/main/webapp/WEB-INF/web.xml b/appengine-java8/multitenancy/src/main/webapp/WEB-INF/web.xml index 92cf8deccd3..c8853530ceb 100644 --- a/appengine-java8/multitenancy/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/multitenancy/src/main/webapp/WEB-INF/web.xml @@ -1,7 +1,24 @@ - + + diff --git a/appengine-java8/oauth2/src/main/webapp/WEB-INF/web.xml b/appengine-java8/oauth2/src/main/webapp/WEB-INF/web.xml index 183e631c600..4aa5ce5ec15 100644 --- a/appengine-java8/oauth2/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/oauth2/src/main/webapp/WEB-INF/web.xml @@ -1,8 +1,24 @@ - + + Oauth2Filter com.example.appengine.Oauth2Filter diff --git a/appengine-java8/pom.xml b/appengine-java8/pom.xml index 07b9f6d7f24..f66738b5135 100644 --- a/appengine-java8/pom.xml +++ b/appengine-java8/pom.xml @@ -54,8 +54,6 @@ guestbook-cloud-datastore guestbook-objectify - helloworld - images logs mailgun diff --git a/appengine-java8/remote/remote-server/src/main/webapp/WEB-INF/web.xml b/appengine-java8/remote/remote-server/src/main/webapp/WEB-INF/web.xml index 0ec344f02b5..1e465028c5a 100644 --- a/appengine-java8/remote/remote-server/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/remote/remote-server/src/main/webapp/WEB-INF/web.xml @@ -1,22 +1,24 @@ - - - + Remote API Servlet diff --git a/appengine-java8/requests/src/main/webapp/WEB-INF/web.xml b/appengine-java8/requests/src/main/webapp/WEB-INF/web.xml index 7784c6a56c6..09f780f6a56 100644 --- a/appengine-java8/requests/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/requests/src/main/webapp/WEB-INF/web.xml @@ -1,8 +1,24 @@ - + + requests com.example.appengine.requests.RequestsServlet diff --git a/appengine-java8/search/pom.xml b/appengine-java8/search/pom.xml index 76973c9c88f..98aa9fc5f6e 100644 --- a/appengine-java8/search/pom.xml +++ b/appengine-java8/search/pom.xml @@ -79,8 +79,6 @@ Copyright 2015 Google Inc. - - ${project.build.directory}/${project.build.finalName}/WEB-INF/classes com.google.cloud.tools diff --git a/appengine-java8/search/src/main/webapp/WEB-INF/web.xml b/appengine-java8/search/src/main/webapp/WEB-INF/web.xml index d3e1e6f8ec3..8138d03c480 100644 --- a/appengine-java8/search/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/search/src/main/webapp/WEB-INF/web.xml @@ -1,8 +1,24 @@ - + + document com.example.appengine.search.DocumentServlet diff --git a/appengine-java8/sendgrid/src/main/webapp/WEB-INF/web.xml b/appengine-java8/sendgrid/src/main/webapp/WEB-INF/web.xml index 23a0e83b821..3a83edc0096 100644 --- a/appengine-java8/sendgrid/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/sendgrid/src/main/webapp/WEB-INF/web.xml @@ -1,22 +1,24 @@ - - - + sendemail com.example.appengine.sendgrid.SendEmailServlet diff --git a/appengine-java8/taskqueue/deferred/src/main/webapp/WEB-INF/web.xml b/appengine-java8/taskqueue/deferred/src/main/webapp/WEB-INF/web.xml index a8b724b5871..aa47a37f557 100644 --- a/appengine-java8/taskqueue/deferred/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/taskqueue/deferred/src/main/webapp/WEB-INF/web.xml @@ -1,24 +1,24 @@ - + defer-sample-servlet com.google.cloud.taskqueue.samples.DeferSampleServlet diff --git a/appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/web.xml b/appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/web.xml index 807f08387c2..87cd397fc0b 100644 --- a/appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/web.xml @@ -1,22 +1,24 @@ - - - + taskqueue com.example.taskqueue.TaskqueueServlet diff --git a/appengine-java8/taskqueue/push/src/main/webapp/WEB-INF/web.xml b/appengine-java8/taskqueue/push/src/main/webapp/WEB-INF/web.xml index b1ab8458b5b..6f57f6b503d 100644 --- a/appengine-java8/taskqueue/push/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/taskqueue/push/src/main/webapp/WEB-INF/web.xml @@ -1,6 +1,6 @@ - + index.html diff --git a/appengine-java8/twilio/src/main/webapp/WEB-INF/web.xml b/appengine-java8/twilio/src/main/webapp/WEB-INF/web.xml index 4791ebe69c4..6cb4c65cf9b 100644 --- a/appengine-java8/twilio/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/twilio/src/main/webapp/WEB-INF/web.xml @@ -1,22 +1,24 @@ - - - + receivecall com.example.appengine.twilio.ReceiveCallServlet diff --git a/appengine-java8/unittests/src/main/webapp/WEB-INF/web.xml b/appengine-java8/unittests/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 6a0e90311ab..00000000000 --- a/appengine-java8/unittests/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java b/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java index f0052655408..e21a3e2d9dd 100644 --- a/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java +++ b/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java @@ -14,6 +14,7 @@ package com.example.appengine; +import javax.servlet.annotation.WebServlet; import org.json.JSONObject; import java.io.BufferedReader; @@ -29,6 +30,7 @@ import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") +@WebServlet(name="URLFetch", description = "URLFetch: Write low order IP address to Cloud SQL", urlPatterns = "/urlfetch") public class UrlFetchServlet extends HttpServlet { @Override @@ -49,7 +51,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) JSONObject jo = new JSONObject(json.toString()); req.setAttribute("joke", jo.getJSONObject("value").getString("joke")); - req.getRequestDispatcher("/main.jsp").forward(req, resp); + req.getRequestDispatcher("/urlfetchresult.jsp").forward(req, resp); } @Override @@ -61,12 +63,12 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp) if (id == null || text == null || id == "" || text == "") { req.setAttribute("error", "invalid input"); - req.getRequestDispatcher("/main.jsp").forward(req, resp); + req.getRequestDispatcher("/urlfetchresult.jsp").forward(req, resp); return; } JSONObject jsonObj = new JSONObject() - .put("userId", 33) + .put("userId", 1) .put("id", id) .put("title", text) .put("body", text); @@ -97,7 +99,7 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp) req.setAttribute("error", conn.getResponseCode() + " " + conn.getResponseMessage()); } // [END complex] - req.getRequestDispatcher("/main.jsp").forward(req, resp); + req.getRequestDispatcher("/urlfetchresult.jsp").forward(req, resp); } } diff --git a/appengine-java8/urlfetch/src/main/webapp/WEB-INF/web.xml b/appengine-java8/urlfetch/src/main/webapp/WEB-INF/web.xml index ddc5cfb4c46..e63b3c46193 100644 --- a/appengine-java8/urlfetch/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/urlfetch/src/main/webapp/WEB-INF/web.xml @@ -1,14 +1,25 @@ - - - hello - com.example.appengine.UrlFetchServlet - - - hello - / - + + + + urlfetch + diff --git a/appengine-java8/urlfetch/src/main/webapp/main.jsp b/appengine-java8/urlfetch/src/main/webapp/urlfetchresult.jsp similarity index 100% rename from appengine-java8/urlfetch/src/main/webapp/main.jsp rename to appengine-java8/urlfetch/src/main/webapp/urlfetchresult.jsp diff --git a/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java b/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java index d654fc78384..25c1ac77a00 100644 --- a/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java +++ b/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java @@ -21,10 +21,12 @@ import java.io.IOException; +import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +@WebServlet(name="UserAPI", description = "UserAPI: Login / Logout with UserService", urlPatterns = "/userapi") public class UsersServlet extends HttpServlet { @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) diff --git a/appengine-java8/users/src/main/webapp/WEB-INF/web.xml b/appengine-java8/users/src/main/webapp/WEB-INF/web.xml index 4b2b77234dc..37a18127a34 100644 --- a/appengine-java8/users/src/main/webapp/WEB-INF/web.xml +++ b/appengine-java8/users/src/main/webapp/WEB-INF/web.xml @@ -1,14 +1,25 @@ - - - users - com.example.appengine.users.UsersServlet - - - users - / - + + + + userapi + From 89ef08fb04c1d75af83053a4c2317f02f55e8fc5 Mon Sep 17 00:00:00 2001 From: Les Vogel Date: Fri, 19 May 2017 13:41:00 -0700 Subject: [PATCH 2/4] Fix check style --- .../example/appengine/analytics/AnalyticsServlet.java | 5 +++-- .../example/appengine/appidentity/IdentityServlet.java | 3 ++- .../example/appengine/appidentity/SignForAppServlet.java | 9 ++++++--- .../appengine/appidentity/UrlShortenerServlet.java | 3 ++- .../com/example/appengine/cloudsql/CloudSqlServlet.java | 3 ++- .../main/java/com/example/appengine/UrlFetchServlet.java | 6 ++++-- .../java/com/example/appengine/users/UsersServlet.java | 3 ++- 7 files changed, 21 insertions(+), 11 deletions(-) diff --git a/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java b/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java index 73ec6057c17..702580ba3b0 100644 --- a/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java +++ b/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java @@ -19,7 +19,6 @@ import com.google.appengine.api.urlfetch.URLFetchService; import com.google.appengine.api.urlfetch.URLFetchServiceFactory; -import javax.servlet.annotation.WebServlet; import org.apache.http.client.utils.URIBuilder; import java.io.IOException; @@ -28,13 +27,15 @@ import java.net.URL; import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; // [START example] @SuppressWarnings("serial") -@WebServlet(name="analytics", description = "Analytics: Send Analytics Event to Google Analytics", urlPatterns = "/analytics") +@WebServlet(name = "analytics", description = "Analytics: Send Analytics Event to Google Analytics", + urlPatterns = "/analytics") public class AnalyticsServlet extends HttpServlet { @Override diff --git a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java index a1e8d2efa30..64016262140 100644 --- a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java +++ b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java @@ -26,7 +26,8 @@ import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") -@WebServlet(name="appidentity", description = "AppIdentity: Get the Host Name", urlPatterns = "/appidentity/identity") +@WebServlet(name = "appidentity", description = "AppIdentity: Get the Host Name", + urlPatterns = "/appidentity/identity") public class IdentityServlet extends HttpServlet { // [START versioned_hostnames] diff --git a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java index 99c41200e1e..fabbcd0fa02 100644 --- a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java +++ b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java @@ -19,6 +19,7 @@ import com.google.appengine.api.appidentity.AppIdentityService; import com.google.appengine.api.appidentity.AppIdentityServiceFactory; import com.google.appengine.api.appidentity.PublicCertificate; + import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; @@ -34,13 +35,15 @@ import java.util.Arrays; import java.util.Calendar; import java.util.Collection; + import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") -@WebServlet(name="signforapp", description = "AppIdentity: Sign 'abcdefg'", urlPatterns = "/appidentity/sign") +@WebServlet(name = "signforapp", description = "AppIdentity: Sign 'abcdefg'", + urlPatterns = "/appidentity/sign") public class SignForAppServlet extends HttpServlet { private final AppIdentityService appIdentity; @@ -80,9 +83,9 @@ private boolean verifySignature(byte[] blob, byte[] blobSignature, PublicKey pk) private String simulateIdentityAssertion() throws CertificateException, UnsupportedEncodingException, NoSuchAlgorithmException, - InvalidKeyException, SignatureException { + InvalidKeyException, SignatureException { // Simulate the sending app. - String message = "abcdefg "+ Calendar.getInstance().getTime().toString(); + String message = "abcdefg " + Calendar.getInstance().getTime().toString(); byte[] blob = message.getBytes(); byte[] blobSignature = signBlob(blob); byte[] publicCert = getPublicCertificate(); diff --git a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java index cf4c608c5b6..7c8b1e66d89 100644 --- a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java +++ b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java @@ -25,7 +25,8 @@ import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") -@WebServlet(name="UrlShortener", description = "AppIdentity: Url Shortener", urlPatterns = "/appidentity/shorten") +@WebServlet(name = "UrlShortener", description = "AppIdentity: Url Shortener", + urlPatterns = "/appidentity/shorten") public class UrlShortenerServlet extends HttpServlet { private final UrlShortener shortener; diff --git a/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java b/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java index 87310c93f73..97c5e60c7f3 100644 --- a/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java +++ b/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java @@ -37,7 +37,8 @@ // [START example] @SuppressWarnings("serial") -@WebServlet(name="CloudSQL", description = "CloudSQL: Write low order IP address to Cloud SQL", urlPatterns = "/cloudsql") +@WebServlet(name = "CloudSQL", description = "CloudSQL: Write low order IP address to Cloud SQL", + urlPatterns = "/cloudsql") public class CloudSqlServlet extends HttpServlet { @Override diff --git a/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java b/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java index e21a3e2d9dd..e81d6ee1af6 100644 --- a/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java +++ b/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java @@ -14,7 +14,6 @@ package com.example.appengine; -import javax.servlet.annotation.WebServlet; import org.json.JSONObject; import java.io.BufferedReader; @@ -24,13 +23,16 @@ import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; + import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") -@WebServlet(name="URLFetch", description = "URLFetch: Write low order IP address to Cloud SQL", urlPatterns = "/urlfetch") +@WebServlet(name = "URLFetch", description = "URLFetch: Write low order IP address to Cloud SQL", + urlPatterns = "/urlfetch") public class UrlFetchServlet extends HttpServlet { @Override diff --git a/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java b/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java index 25c1ac77a00..b9905f3bf1d 100644 --- a/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java +++ b/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java @@ -26,7 +26,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -@WebServlet(name="UserAPI", description = "UserAPI: Login / Logout with UserService", urlPatterns = "/userapi") +@WebServlet(name = "UserAPI", description = "UserAPI: Login / Logout with UserService", + urlPatterns = "/userapi") public class UsersServlet extends HttpServlet { @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) From a31041ea5b95566ab62bb0b79a903dd99a463d17 Mon Sep 17 00:00:00 2001 From: Les Vogel Date: Fri, 19 May 2017 14:20:34 -0700 Subject: [PATCH 3/4] strike unittests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. things stopped working, so I took them out. I’ll try to put them back later, but they are just a copy from the root. --- appengine-java8/pom.xml | 2 - appengine-java8/unittests/README.md | 9 -- appengine-java8/unittests/pom.xml | 94 ------------------- .../src/main/webapp/WEB-INF/appengine-web.xml | 9 -- .../main/webapp/WEB-INF/logging.properties | 13 --- .../src/main/webapp/WEB-INF/queue.xml | 10 -- .../appengine/samples/AuthenticationTest.java | 54 ----------- .../appengine/samples/DeferredTaskTest.java | 76 --------------- ...LocalCustomPolicyHighRepDatastoreTest.java | 81 ---------------- .../appengine/samples/LocalDatastoreTest.java | 70 -------------- .../samples/LocalHighRepDatastoreTest.java | 66 ------------- .../appengine/samples/LocalMemcacheTest.java | 72 -------------- .../appengine/samples/LocalUrlFetchTest.java | 77 --------------- .../google/appengine/samples/MyFirstTest.java | 31 ------ .../google/appengine/samples/ShortTest.java | 59 ------------ .../samples/TaskQueueConfigTest.java | 75 --------------- .../appengine/samples/TaskQueueTest.java | 73 -------------- 17 files changed, 871 deletions(-) delete mode 100644 appengine-java8/unittests/README.md delete mode 100644 appengine-java8/unittests/pom.xml delete mode 100644 appengine-java8/unittests/src/main/webapp/WEB-INF/appengine-web.xml delete mode 100644 appengine-java8/unittests/src/main/webapp/WEB-INF/logging.properties delete mode 100644 appengine-java8/unittests/src/main/webapp/WEB-INF/queue.xml delete mode 100644 appengine-java8/unittests/src/test/java/com/google/appengine/samples/AuthenticationTest.java delete mode 100644 appengine-java8/unittests/src/test/java/com/google/appengine/samples/DeferredTaskTest.java delete mode 100644 appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalCustomPolicyHighRepDatastoreTest.java delete mode 100644 appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalDatastoreTest.java delete mode 100644 appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalHighRepDatastoreTest.java delete mode 100644 appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalMemcacheTest.java delete mode 100644 appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalUrlFetchTest.java delete mode 100644 appengine-java8/unittests/src/test/java/com/google/appengine/samples/MyFirstTest.java delete mode 100644 appengine-java8/unittests/src/test/java/com/google/appengine/samples/ShortTest.java delete mode 100644 appengine-java8/unittests/src/test/java/com/google/appengine/samples/TaskQueueConfigTest.java delete mode 100644 appengine-java8/unittests/src/test/java/com/google/appengine/samples/TaskQueueTest.java diff --git a/appengine-java8/pom.xml b/appengine-java8/pom.xml index f66738b5135..dc39478adca 100644 --- a/appengine-java8/pom.xml +++ b/appengine-java8/pom.xml @@ -76,8 +76,6 @@ twilio - unittests - urlfetch users diff --git a/appengine-java8/unittests/README.md b/appengine-java8/unittests/README.md deleted file mode 100644 index cd62f828b4f..00000000000 --- a/appengine-java8/unittests/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# appengine-ndb-snippets - -## unittests - -This subdirectory contains code snippets for [Local Unit Testing for Java](https://cloud.google.com/appengine/docs/java/tools/localunittesting). - -App shows all the ways to unit test. - - mvn verify diff --git a/appengine-java8/unittests/pom.xml b/appengine-java8/unittests/pom.xml deleted file mode 100644 index a846a80f811..00000000000 --- a/appengine-java8/unittests/pom.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - 4.0.0 - war - 1.0-SNAPSHOT - - - - appengine-java8-samples - com.google.cloud - 1.0.0 - .. - - - com.google.appengine.samples - unittests-appengine-local-testing-samples-j8 - - - 1.9.52 - UTF-8 - 1.22.0 - - - - - - com.google.appengine - appengine-api-1.0-sdk - ${appengine.sdk.version} - - - - javax.servlet - javax.servlet-api - 3.1.0 - jar - provided - - - - jstl - jstl - 1.2 - - - - - junit - junit - 4.12 - test - - - com.google.appengine - appengine-testing - ${appengine.sdk.version} - test - - - com.google.appengine - appengine-api-stubs - ${appengine.sdk.version} - test - - - com.google.appengine - appengine-tools-sdk - ${appengine.sdk.version} - test - - - com.google.api-client - google-api-client-appengine - ${google-api-client.version} - test - - - - - - - com.google.cloud.tools - appengine-maven-plugin - 1.3.1 - - true - true - - - - - - diff --git a/appengine-java8/unittests/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/unittests/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index a921b3b65d8..00000000000 --- a/appengine-java8/unittests/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - java8 - true - - - - - diff --git a/appengine-java8/unittests/src/main/webapp/WEB-INF/logging.properties b/appengine-java8/unittests/src/main/webapp/WEB-INF/logging.properties deleted file mode 100644 index a17206681f0..00000000000 --- a/appengine-java8/unittests/src/main/webapp/WEB-INF/logging.properties +++ /dev/null @@ -1,13 +0,0 @@ -# A default java.util.logging configuration. -# (All App Engine logging is through java.util.logging by default). -# -# To use this configuration, copy it into your application's WEB-INF -# folder and add the following to your appengine-web.xml: -# -# -# -# -# - -# Set the default logging level for all loggers to WARNING -.level = WARNING diff --git a/appengine-java8/unittests/src/main/webapp/WEB-INF/queue.xml b/appengine-java8/unittests/src/main/webapp/WEB-INF/queue.xml deleted file mode 100644 index a0d8b77c060..00000000000 --- a/appengine-java8/unittests/src/main/webapp/WEB-INF/queue.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - default - 1/s - - - my-queue-name - 3/s - - diff --git a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/AuthenticationTest.java b/appengine-java8/unittests/src/test/java/com/google/appengine/samples/AuthenticationTest.java deleted file mode 100644 index c300702fb20..00000000000 --- a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/AuthenticationTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.google.appengine.samples; - -// [START AuthenticationTest] - -import static org.junit.Assert.assertTrue; - -import com.google.appengine.api.users.UserService; -import com.google.appengine.api.users.UserServiceFactory; -import com.google.appengine.tools.development.testing.LocalServiceTestHelper; -import com.google.appengine.tools.development.testing.LocalUserServiceTestConfig; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class AuthenticationTest { - - private final LocalServiceTestHelper helper = - new LocalServiceTestHelper(new LocalUserServiceTestConfig()) - .setEnvIsAdmin(true).setEnvIsLoggedIn(true); - - @Before - public void setUp() { - helper.setUp(); - } - - @After - public void tearDown() { - helper.tearDown(); - } - - @Test - public void testIsAdmin() { - UserService userService = UserServiceFactory.getUserService(); - assertTrue(userService.isUserAdmin()); - } -} -// [END AuthenticationTest] diff --git a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/DeferredTaskTest.java b/appengine-java8/unittests/src/test/java/com/google/appengine/samples/DeferredTaskTest.java deleted file mode 100644 index 3477305210e..00000000000 --- a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/DeferredTaskTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.google.appengine.samples; - -// [START DeferredTaskTest] - -import static org.junit.Assert.assertTrue; - -import com.google.appengine.api.taskqueue.DeferredTask; -import com.google.appengine.api.taskqueue.QueueFactory; -import com.google.appengine.api.taskqueue.TaskOptions; -import com.google.appengine.tools.development.testing.LocalServiceTestHelper; -import com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import java.util.concurrent.TimeUnit; - -public class DeferredTaskTest { - - // Unlike CountDownLatch, TaskCountDownlatch lets us reset. - private final LocalTaskQueueTestConfig.TaskCountDownLatch latch = - new LocalTaskQueueTestConfig.TaskCountDownLatch(1); - - private final LocalServiceTestHelper helper = - new LocalServiceTestHelper(new LocalTaskQueueTestConfig() - .setDisableAutoTaskExecution(false) - .setCallbackClass(LocalTaskQueueTestConfig.DeferredTaskCallback.class) - .setTaskExecutionLatch(latch)); - - private static class MyTask implements DeferredTask { - private static boolean taskRan = false; - - @Override - public void run() { - taskRan = true; - } - } - - @Before - public void setUp() { - helper.setUp(); - } - - @After - public void tearDown() { - MyTask.taskRan = false; - latch.reset(); - helper.tearDown(); - } - - @Test - public void testTaskGetsRun() throws InterruptedException { - QueueFactory.getDefaultQueue().add( - TaskOptions.Builder.withPayload(new MyTask())); - assertTrue(latch.await(5, TimeUnit.SECONDS)); - assertTrue(MyTask.taskRan); - } -} -// [END DeferredTaskTest] diff --git a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalCustomPolicyHighRepDatastoreTest.java b/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalCustomPolicyHighRepDatastoreTest.java deleted file mode 100644 index ef889c7579e..00000000000 --- a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalCustomPolicyHighRepDatastoreTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.google.appengine.samples; - -// [START LocalCustomPolicyHighRepDatastoreTest] - -import static com.google.appengine.api.datastore.FetchOptions.Builder.withLimit; -import static org.junit.Assert.assertEquals; - -import com.google.appengine.api.datastore.DatastoreService; -import com.google.appengine.api.datastore.DatastoreServiceFactory; -import com.google.appengine.api.datastore.Entity; -import com.google.appengine.api.datastore.Key; -import com.google.appengine.api.datastore.Query; -import com.google.appengine.api.datastore.dev.HighRepJobPolicy; -import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig; -import com.google.appengine.tools.development.testing.LocalServiceTestHelper; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class LocalCustomPolicyHighRepDatastoreTest { - private static final class CustomHighRepJobPolicy implements HighRepJobPolicy { - static int newJobCounter = 0; - static int existingJobCounter = 0; - - @Override - public boolean shouldApplyNewJob(Key entityGroup) { - // Every other new job fails to apply. - return newJobCounter++ % 2 == 0; - } - - @Override - public boolean shouldRollForwardExistingJob(Key entityGroup) { - // Every other existing job fails to apply. - return existingJobCounter++ % 2 == 0; - } - } - - private final LocalServiceTestHelper helper = - new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig() - .setAlternateHighRepJobPolicyClass(CustomHighRepJobPolicy.class)); - - @Before - public void setUp() { - helper.setUp(); - } - - @After - public void tearDown() { - helper.tearDown(); - } - - @Test - public void testEventuallyConsistentGlobalQueryResult() { - DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); - ds.put(new Entity("yam")); // applies - ds.put(new Entity("yam")); // does not apply - // First global query only sees the first Entity. - assertEquals(1, ds.prepare(new Query("yam")).countEntities(withLimit(10))); - // Second global query sees both Entities because we "groom" (attempt to - // apply unapplied jobs) after every query. - assertEquals(2, ds.prepare(new Query("yam")).countEntities(withLimit(10))); - } -} -// [END LocalCustomPolicyHighRepDatastoreTest] diff --git a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalDatastoreTest.java b/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalDatastoreTest.java deleted file mode 100644 index 2b451c8d65b..00000000000 --- a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalDatastoreTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.google.appengine.samples; - -// [START LocalDatastoreTest] - -import static com.google.appengine.api.datastore.FetchOptions.Builder.withLimit; -import static org.junit.Assert.assertEquals; - -import com.google.appengine.api.datastore.DatastoreService; -import com.google.appengine.api.datastore.DatastoreServiceFactory; -import com.google.appengine.api.datastore.Entity; -import com.google.appengine.api.datastore.Query; -import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig; -import com.google.appengine.tools.development.testing.LocalServiceTestHelper; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class LocalDatastoreTest { - - private final LocalServiceTestHelper helper = - new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig()); - - @Before - public void setUp() { - helper.setUp(); - } - - @After - public void tearDown() { - helper.tearDown(); - } - - // Run this test twice to prove we're not leaking any state across tests. - private void doTest() { - DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); - assertEquals(0, ds.prepare(new Query("yam")).countEntities(withLimit(10))); - ds.put(new Entity("yam")); - ds.put(new Entity("yam")); - assertEquals(2, ds.prepare(new Query("yam")).countEntities(withLimit(10))); - } - - @Test - public void testInsert1() { - doTest(); - } - - @Test - public void testInsert2() { - doTest(); - } -} - -// [END LocalDatastoreTest] diff --git a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalHighRepDatastoreTest.java b/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalHighRepDatastoreTest.java deleted file mode 100644 index 8d696ad21d4..00000000000 --- a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalHighRepDatastoreTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.google.appengine.samples; - -// [START LocalHighRepDatastoreTest] - -import static com.google.appengine.api.datastore.FetchOptions.Builder.withLimit; -import static org.junit.Assert.assertEquals; - -import com.google.appengine.api.datastore.DatastoreService; -import com.google.appengine.api.datastore.DatastoreServiceFactory; -import com.google.appengine.api.datastore.Entity; -import com.google.appengine.api.datastore.Key; -import com.google.appengine.api.datastore.KeyFactory; -import com.google.appengine.api.datastore.Query; -import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig; -import com.google.appengine.tools.development.testing.LocalServiceTestHelper; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class LocalHighRepDatastoreTest { - - // Maximum eventual consistency. - private final LocalServiceTestHelper helper = - new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig() - .setDefaultHighRepJobPolicyUnappliedJobPercentage(100)); - - @Before - public void setUp() { - helper.setUp(); - } - - @After - public void tearDown() { - helper.tearDown(); - } - - @Test - public void testEventuallyConsistentGlobalQueryResult() { - DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); - Key ancestor = KeyFactory.createKey("foo", 3); - ds.put(new Entity("yam", ancestor)); - ds.put(new Entity("yam", ancestor)); - // Global query doesn't see the data. - assertEquals(0, ds.prepare(new Query("yam")).countEntities(withLimit(10))); - // Ancestor query does see the data. - assertEquals(2, ds.prepare(new Query("yam", ancestor)).countEntities(withLimit(10))); - } -} -// [END LocalHighRepDatastoreTest] diff --git a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalMemcacheTest.java b/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalMemcacheTest.java deleted file mode 100644 index 39186086cc2..00000000000 --- a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalMemcacheTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.google.appengine.samples; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -// [START imports] - -import com.google.appengine.api.memcache.MemcacheService; -import com.google.appengine.api.memcache.MemcacheServiceFactory; -import com.google.appengine.tools.development.testing.LocalMemcacheServiceTestConfig; -import com.google.appengine.tools.development.testing.LocalServiceTestHelper; - -// [END imports] - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -// [START NameAndHelper] -public class LocalMemcacheTest { - - private final LocalServiceTestHelper helper = - new LocalServiceTestHelper(new LocalMemcacheServiceTestConfig()); - - // [END NameAndHelper] - - @Before - public void setUp() { - helper.setUp(); - } - - @After - public void tearDown() { - helper.tearDown(); - } - - // Run this test twice to prove we're not leaking any state across tests. - // [START doTest] - private void doTest() { - MemcacheService ms = MemcacheServiceFactory.getMemcacheService(); - assertFalse(ms.contains("yar")); - ms.put("yar", "foo"); - assertTrue(ms.contains("yar")); - } - // [END doTest] - - @Test - public void testInsert1() { - doTest(); - } - - @Test - public void testInsert2() { - doTest(); - } -} diff --git a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalUrlFetchTest.java b/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalUrlFetchTest.java deleted file mode 100644 index b0e616f721e..00000000000 --- a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/LocalUrlFetchTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2016 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.google.appengine.samples; - -import static org.junit.Assert.assertEquals; - -import com.google.api.client.http.GenericUrl; -import com.google.api.client.http.HttpRequestFactory; -import com.google.api.client.http.HttpResponse; -import com.google.api.client.http.LowLevelHttpRequest; -import com.google.api.client.http.LowLevelHttpResponse; -import com.google.api.client.testing.http.MockHttpTransport; -import com.google.api.client.testing.http.MockLowLevelHttpRequest; -import com.google.api.client.testing.http.MockLowLevelHttpResponse; -import com.google.appengine.tools.development.testing.LocalServiceTestHelper; -import com.google.appengine.tools.development.testing.LocalURLFetchServiceTestConfig; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import java.io.IOException; - -public class LocalUrlFetchTest { - private final LocalServiceTestHelper helper = - new LocalServiceTestHelper(new LocalURLFetchServiceTestConfig()); - - @Before - public void setUp() { - helper.setUp(); - } - - @After - public void tearDown() { - helper.tearDown(); - } - - @Test - public void testMockUrlFetch() throws IOException { - // See http://g.co/dv/api-client-library/java/google-http-java-client/unit-testing - MockHttpTransport mockHttpTransport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - assertEquals(method, "GET"); - assertEquals(url, "http://foo.bar"); - - return new MockLowLevelHttpRequest() { - @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); - response.setStatusCode(234); - return response; - } - }; - } - }; - - HttpRequestFactory requestFactory = mockHttpTransport.createRequestFactory(); - HttpResponse response = requestFactory.buildGetRequest(new GenericUrl("http://foo.bar")) - .execute(); - assertEquals(response.getStatusCode(), 234); - } -} diff --git a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/MyFirstTest.java b/appengine-java8/unittests/src/test/java/com/google/appengine/samples/MyFirstTest.java deleted file mode 100644 index f60eed48e1c..00000000000 --- a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/MyFirstTest.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.google.appengine.samples; - -// [START MyFirstTest] - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -public class MyFirstTest { - @Test - public void testAddition() { - assertEquals(4, 2 + 2); - } -} -// [END MyFirstTest] diff --git a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/ShortTest.java b/appengine-java8/unittests/src/test/java/com/google/appengine/samples/ShortTest.java deleted file mode 100644 index a024c08bcd3..00000000000 --- a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/ShortTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.google.appengine.samples; - -// [START ShortTest] - -import static org.junit.Assert.assertEquals; - -import com.google.appengine.api.capabilities.Capability; -import com.google.appengine.api.capabilities.CapabilityStatus; -import com.google.appengine.api.datastore.DatastoreService; -import com.google.appengine.api.datastore.DatastoreServiceFactory; -import com.google.appengine.api.datastore.FetchOptions; -import com.google.appengine.api.datastore.Query; -import com.google.appengine.tools.development.testing.LocalCapabilitiesServiceTestConfig; -import com.google.appengine.tools.development.testing.LocalServiceTestHelper; -import com.google.apphosting.api.ApiProxy; - -import org.junit.After; -import org.junit.Test; - -public class ShortTest { - private LocalServiceTestHelper helper; - - @After - public void tearDown() { - helper.tearDown(); - } - - @Test(expected = ApiProxy.CapabilityDisabledException.class) - public void testDisabledDatastore() { - Capability testOne = new Capability("datastore_v3"); - CapabilityStatus testStatus = CapabilityStatus.DISABLED; - // Initialize the test configuration. - LocalCapabilitiesServiceTestConfig config = - new LocalCapabilitiesServiceTestConfig().setCapabilityStatus(testOne, testStatus); - helper = new LocalServiceTestHelper(config); - helper.setUp(); - FetchOptions fo = FetchOptions.Builder.withLimit(10); - DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); - assertEquals(0, ds.prepare(new Query("yam")).countEntities(fo)); - } -} - -// [END ShortTest] diff --git a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/TaskQueueConfigTest.java b/appengine-java8/unittests/src/test/java/com/google/appengine/samples/TaskQueueConfigTest.java deleted file mode 100644 index 84e5d91b15f..00000000000 --- a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/TaskQueueConfigTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.google.appengine.samples; - -import static org.junit.Assert.assertEquals; - -import com.google.appengine.api.taskqueue.QueueFactory; -import com.google.appengine.api.taskqueue.TaskOptions; -import com.google.appengine.api.taskqueue.dev.LocalTaskQueue; -import com.google.appengine.api.taskqueue.dev.QueueStateInfo; -import com.google.appengine.tools.development.testing.LocalServiceTestHelper; -import com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class TaskQueueConfigTest { - // [START LocalServiceTestHelper] - private final LocalServiceTestHelper helper = - new LocalServiceTestHelper(new LocalTaskQueueTestConfig() - .setQueueXmlPath("src/main/webapp/WEB-INF/queue.xml")); - //[END LocalServiceTestHelper] - - @Before - public void setUp() { - helper.setUp(); - } - - @After - public void tearDown() { - helper.tearDown(); - } - - // Run this test twice to demonstrate we're not leaking state across tests. - // If we _are_ leaking state across tests we'll get an exception on the - // second test because there will already be a task with the given name. - private void doTest() throws InterruptedException { - // [START QueueFactory] - QueueFactory.getQueue("my-queue-name").add(TaskOptions.Builder.withTaskName("task29")); - // [END QueueFactory] - // Give the task time to execute if tasks are actually enabled (which they - // aren't, but that's part of the test). - Thread.sleep(1000); - LocalTaskQueue ltq = LocalTaskQueueTestConfig.getLocalTaskQueue(); - QueueStateInfo qsi = - ltq.getQueueStateInfo().get(QueueFactory.getQueue("my-queue-name").getQueueName()); - assertEquals(1, qsi.getTaskInfo().size()); - assertEquals("task29", qsi.getTaskInfo().get(0).getTaskName()); - } - - @Test - public void testTaskGetsScheduled1() throws InterruptedException { - doTest(); - } - - @Test - public void testTaskGetsScheduled2() throws InterruptedException { - doTest(); - } -} diff --git a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/TaskQueueTest.java b/appengine-java8/unittests/src/test/java/com/google/appengine/samples/TaskQueueTest.java deleted file mode 100644 index 3616fb035e2..00000000000 --- a/appengine-java8/unittests/src/test/java/com/google/appengine/samples/TaskQueueTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -package com.google.appengine.samples; - -// [START TaskQueueTest] - -import static org.junit.Assert.assertEquals; - -import com.google.appengine.api.taskqueue.QueueFactory; -import com.google.appengine.api.taskqueue.TaskOptions; -import com.google.appengine.api.taskqueue.dev.LocalTaskQueue; -import com.google.appengine.api.taskqueue.dev.QueueStateInfo; -import com.google.appengine.tools.development.testing.LocalServiceTestHelper; -import com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class TaskQueueTest { - - private final LocalServiceTestHelper helper = - new LocalServiceTestHelper(new LocalTaskQueueTestConfig()); - - @Before - public void setUp() { - helper.setUp(); - } - - @After - public void tearDown() { - helper.tearDown(); - } - - // Run this test twice to demonstrate we're not leaking state across tests. - // If we _are_ leaking state across tests we'll get an exception on the - // second test because there will already be a task with the given name. - private void doTest() throws InterruptedException { - QueueFactory.getDefaultQueue().add(TaskOptions.Builder.withTaskName("task29")); - // Give the task time to execute if tasks are actually enabled (which they - // aren't, but that's part of the test). - Thread.sleep(1000); - LocalTaskQueue ltq = LocalTaskQueueTestConfig.getLocalTaskQueue(); - QueueStateInfo qsi = ltq.getQueueStateInfo().get(QueueFactory.getDefaultQueue().getQueueName()); - assertEquals(1, qsi.getTaskInfo().size()); - assertEquals("task29", qsi.getTaskInfo().get(0).getTaskName()); - } - - @Test - public void testTaskGetsScheduled1() throws InterruptedException { - doTest(); - } - - @Test - public void testTaskGetsScheduled2() throws InterruptedException { - doTest(); - } -} -// [END TaskQueueTest] From 23f05a26bf8ae3aa6199960438177140d8414cd0 Mon Sep 17 00:00:00 2001 From: Les Vogel Date: Sun, 21 May 2017 19:09:24 -0700 Subject: [PATCH 4/4] Moved a few things... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Moved Taskqueue’s up a level. 2. Moved Datastore up a level 3. Moved remove up a level 4. Endpoints-Frameworks-v2 -> endpoints-v2-migration & endpoints-v2-backend 5. Firebase-event-proxy up a level --- .../pom.xml | 2 +- .../com/example/appengine/IndexesServlet.java | 0 .../src/main/webapp/WEB-INF/appengine-web.xml | 0 .../main/webapp/WEB-INF/datastore-indexes.xml | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../example/appengine/IndexesServletTest.java | 0 .../pom.xml | 2 +- .../com/example/appengine/IndexesServlet.java | 0 .../src/main/webapp/WEB-INF/appengine-web.xml | 0 .../main/webapp/WEB-INF/datastore-indexes.xml | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../example/appengine/IndexesServletTest.java | 0 .../indexes => datastore-indexes}/pom.xml | 2 +- .../com/example/appengine/IndexesServlet.java | 0 .../src/main/webapp/WEB-INF/appengine-web.xml | 0 .../main/webapp/WEB-INF/datastore-indexes.xml | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../example/appengine/IndexesServletTest.java | 0 .../README.md => endpoints-v2-README.md} | 0 .../.gitignore | 0 .../README.md | 0 .../backend => endpoints-v2-backend}/pom.xml | 2 +- .../src/main/java/com/example/echo/Echo.java | 0 .../src/main/java/com/example/echo/Email.java | 0 .../main/java/com/example/echo/Message.java | 0 .../src/main/webapp/WEB-INF/appengine-web.xml | 0 .../main/webapp/WEB-INF/logging.properties | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../README.md | 0 .../build.gradle | 0 .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradlew | 0 .../gradlew.bat | 0 .../jenkins.sh | 0 .../pom.xml | 2 +- .../com/example/helloendpoints/Constants.java | 0 .../com/example/helloendpoints/Greetings.java | 0 .../example/helloendpoints/HelloGreeting.java | 0 .../src/main/webapp/WEB-INF/appengine-web.xml | 0 .../main/webapp/WEB-INF/logging.properties | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../bootstrap/css/bootstrap-responsive.css | 0 .../main/webapp/bootstrap/css/bootstrap.css | 0 .../src/main/webapp/css/style.css | 0 .../src/main/webapp/index.html | 0 .../src/main/webapp/js/base.js | 0 .../.gitignore | 0 .../app.yaml | 0 .../main.py | 0 ...ADME.md => firebase-event-proxy-README.md} | 0 .../{gae-firebase-event-proxy => }/pom.xml | 2 +- .../FirebaseEventProxy.java | 0 .../ServletContextListenerImpl.java | 0 .../src/main/webapp/WEB-INF/appengine-web.xml | 0 .../main/webapp/WEB-INF/logging.properties | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../src/main/webapp/index.jsp | 0 appengine-java8/pom.xml | 21 ++++++++++--------- .../{remote => }/remote-server/pom.xml | 2 +- .../appengine/remote/RemoteServlet.java | 0 .../src/main/webapp/WEB-INF/appengine-web.xml | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../remote/{remote-client => client}/pom.xml | 0 .../appengine/remote/RemoteApiExample.java | 0 .../README.md => taskqueue-README.md} | 0 .../README.md | 0 .../deferred => taskqueues-deferred}/pom.xml | 2 +- .../taskqueue/samples/DeferSampleServlet.java | 0 .../src/main/webapp/WEB-INF/appengine-web.xml | 0 .../main/webapp/WEB-INF/logging.properties | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../src/main/webapp/guestbook.jsp | 0 .../pull => taskqueues-pull}/README.md | 0 .../pull => taskqueues-pull}/pom.xml | 2 +- .../example/taskqueue/TaskqueueServlet.java | 0 .../src/main/webapp/WEB-INF/appengine-web.xml | 0 .../main/webapp/WEB-INF/logging.properties | 0 .../src/main/webapp/WEB-INF/queue.xml | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../src/main/webapp/tasks.jsp | 0 .../push => taskqueues-push}/README.md | 0 .../push => taskqueues-push}/pom.xml | 2 +- .../appengine/taskqueue/push/Enqueue.java | 0 .../appengine/taskqueue/push/Worker.java | 0 .../src/main/webapp/WEB-INF/appengine-web.xml | 0 .../src/main/webapp/WEB-INF/web.xml | 0 .../src/main/webapp/index.html | 0 .../appengine/taskqueue/push/WorkerTest.java | 0 88 files changed, 21 insertions(+), 20 deletions(-) rename appengine-java8/{datastore/indexes-exploding => datastore-indexes-exploding}/pom.xml (98%) rename appengine-java8/{datastore/indexes-exploding => datastore-indexes-exploding}/src/main/java/com/example/appengine/IndexesServlet.java (100%) rename appengine-java8/{datastore/indexes-exploding => datastore-indexes-exploding}/src/main/webapp/WEB-INF/appengine-web.xml (100%) rename appengine-java8/{datastore/indexes-exploding => datastore-indexes-exploding}/src/main/webapp/WEB-INF/datastore-indexes.xml (100%) rename appengine-java8/{datastore/indexes-exploding => datastore-indexes-exploding}/src/main/webapp/WEB-INF/web.xml (100%) rename appengine-java8/{datastore/indexes-exploding => datastore-indexes-exploding}/src/test/java/com/example/appengine/IndexesServletTest.java (100%) rename appengine-java8/{datastore/indexes-perfect => datastore-indexes-perfect}/pom.xml (98%) rename appengine-java8/{datastore/indexes-perfect => datastore-indexes-perfect}/src/main/java/com/example/appengine/IndexesServlet.java (100%) rename appengine-java8/{datastore/indexes-perfect => datastore-indexes-perfect}/src/main/webapp/WEB-INF/appengine-web.xml (100%) rename appengine-java8/{datastore/indexes-perfect => datastore-indexes-perfect}/src/main/webapp/WEB-INF/datastore-indexes.xml (100%) rename appengine-java8/{datastore/indexes-perfect => datastore-indexes-perfect}/src/main/webapp/WEB-INF/web.xml (100%) rename appengine-java8/{datastore/indexes-perfect => datastore-indexes-perfect}/src/test/java/com/example/appengine/IndexesServletTest.java (100%) rename appengine-java8/{datastore/indexes => datastore-indexes}/pom.xml (98%) rename appengine-java8/{datastore/indexes => datastore-indexes}/src/main/java/com/example/appengine/IndexesServlet.java (100%) rename appengine-java8/{datastore/indexes => datastore-indexes}/src/main/webapp/WEB-INF/appengine-web.xml (100%) rename appengine-java8/{datastore/indexes => datastore-indexes}/src/main/webapp/WEB-INF/datastore-indexes.xml (100%) rename appengine-java8/{datastore/indexes => datastore-indexes}/src/main/webapp/WEB-INF/web.xml (100%) rename appengine-java8/{datastore/indexes => datastore-indexes}/src/test/java/com/example/appengine/IndexesServletTest.java (100%) rename appengine-java8/{endpoints-frameworks-v2/README.md => endpoints-v2-README.md} (100%) rename appengine-java8/{endpoints-frameworks-v2/backend => endpoints-v2-backend}/.gitignore (100%) rename appengine-java8/{endpoints-frameworks-v2/backend => endpoints-v2-backend}/README.md (100%) rename appengine-java8/{endpoints-frameworks-v2/backend => endpoints-v2-backend}/pom.xml (99%) rename appengine-java8/{endpoints-frameworks-v2/backend => endpoints-v2-backend}/src/main/java/com/example/echo/Echo.java (100%) rename appengine-java8/{endpoints-frameworks-v2/backend => endpoints-v2-backend}/src/main/java/com/example/echo/Email.java (100%) rename appengine-java8/{endpoints-frameworks-v2/backend => endpoints-v2-backend}/src/main/java/com/example/echo/Message.java (100%) rename appengine-java8/{endpoints-frameworks-v2/backend => endpoints-v2-backend}/src/main/webapp/WEB-INF/appengine-web.xml (100%) rename appengine-java8/{endpoints-frameworks-v2/backend => endpoints-v2-backend}/src/main/webapp/WEB-INF/logging.properties (100%) rename appengine-java8/{endpoints-frameworks-v2/backend => endpoints-v2-backend}/src/main/webapp/WEB-INF/web.xml (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/README.md (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/build.gradle (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/gradle/wrapper/gradle-wrapper.properties (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/gradlew (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/gradlew.bat (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/jenkins.sh (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/pom.xml (99%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/src/main/java/com/example/helloendpoints/Constants.java (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/src/main/java/com/example/helloendpoints/Greetings.java (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/src/main/java/com/example/helloendpoints/HelloGreeting.java (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/src/main/webapp/WEB-INF/appengine-web.xml (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/src/main/webapp/WEB-INF/logging.properties (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/src/main/webapp/WEB-INF/web.xml (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/src/main/webapp/bootstrap/css/bootstrap-responsive.css (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/src/main/webapp/bootstrap/css/bootstrap.css (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/src/main/webapp/css/style.css (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/src/main/webapp/index.html (100%) rename appengine-java8/{endpoints-frameworks-v2/migration-example => endpoints-v2-migration}/src/main/webapp/js/base.js (100%) rename appengine-java8/{firebase-event-proxy/gae-firebase-listener-python => firebase-event-listener-python}/.gitignore (100%) rename appengine-java8/{firebase-event-proxy/gae-firebase-listener-python => firebase-event-listener-python}/app.yaml (100%) rename appengine-java8/{firebase-event-proxy/gae-firebase-listener-python => firebase-event-listener-python}/main.py (100%) rename appengine-java8/{firebase-event-proxy/README.md => firebase-event-proxy-README.md} (100%) rename appengine-java8/firebase-event-proxy/{gae-firebase-event-proxy => }/pom.xml (98%) rename appengine-java8/firebase-event-proxy/{gae-firebase-event-proxy => }/src/main/java/com/example/GaeFirebaseEventProxy/FirebaseEventProxy.java (100%) rename appengine-java8/firebase-event-proxy/{gae-firebase-event-proxy => }/src/main/java/com/example/GaeFirebaseEventProxy/ServletContextListenerImpl.java (100%) rename appengine-java8/firebase-event-proxy/{gae-firebase-event-proxy => }/src/main/webapp/WEB-INF/appengine-web.xml (100%) rename appengine-java8/firebase-event-proxy/{gae-firebase-event-proxy => }/src/main/webapp/WEB-INF/logging.properties (100%) rename appengine-java8/firebase-event-proxy/{gae-firebase-event-proxy => }/src/main/webapp/WEB-INF/web.xml (100%) rename appengine-java8/firebase-event-proxy/{gae-firebase-event-proxy => }/src/main/webapp/index.jsp (100%) rename appengine-java8/{remote => }/remote-server/pom.xml (98%) rename appengine-java8/{remote => }/remote-server/src/main/java/com/example/appengine/remote/RemoteServlet.java (100%) rename appengine-java8/{remote => }/remote-server/src/main/webapp/WEB-INF/appengine-web.xml (100%) rename appengine-java8/{remote => }/remote-server/src/main/webapp/WEB-INF/web.xml (100%) rename appengine-java8/remote/{remote-client => client}/pom.xml (100%) rename appengine-java8/remote/{remote-client => client}/src/main/java/com/example/appengine/remote/RemoteApiExample.java (100%) rename appengine-java8/{taskqueue/README.md => taskqueue-README.md} (100%) rename appengine-java8/{taskqueue/deferred => taskqueues-deferred}/README.md (100%) rename appengine-java8/{taskqueue/deferred => taskqueues-deferred}/pom.xml (98%) rename appengine-java8/{taskqueue/deferred => taskqueues-deferred}/src/main/java/com/google/cloud/taskqueue/samples/DeferSampleServlet.java (100%) rename appengine-java8/{taskqueue/deferred => taskqueues-deferred}/src/main/webapp/WEB-INF/appengine-web.xml (100%) rename appengine-java8/{taskqueue/deferred => taskqueues-deferred}/src/main/webapp/WEB-INF/logging.properties (100%) rename appengine-java8/{taskqueue/deferred => taskqueues-deferred}/src/main/webapp/WEB-INF/web.xml (100%) rename appengine-java8/{taskqueue/deferred => taskqueues-deferred}/src/main/webapp/guestbook.jsp (100%) rename appengine-java8/{taskqueue/pull => taskqueues-pull}/README.md (100%) rename appengine-java8/{taskqueue/pull => taskqueues-pull}/pom.xml (98%) rename appengine-java8/{taskqueue/pull => taskqueues-pull}/src/main/java/com/example/taskqueue/TaskqueueServlet.java (100%) rename appengine-java8/{taskqueue/pull => taskqueues-pull}/src/main/webapp/WEB-INF/appengine-web.xml (100%) rename appengine-java8/{taskqueue/pull => taskqueues-pull}/src/main/webapp/WEB-INF/logging.properties (100%) rename appengine-java8/{taskqueue/pull => taskqueues-pull}/src/main/webapp/WEB-INF/queue.xml (100%) rename appengine-java8/{taskqueue/pull => taskqueues-pull}/src/main/webapp/WEB-INF/web.xml (100%) rename appengine-java8/{taskqueue/pull => taskqueues-pull}/src/main/webapp/tasks.jsp (100%) rename appengine-java8/{taskqueue/push => taskqueues-push}/README.md (100%) rename appengine-java8/{taskqueue/push => taskqueues-push}/pom.xml (98%) rename appengine-java8/{taskqueue/push => taskqueues-push}/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java (100%) rename appengine-java8/{taskqueue/push => taskqueues-push}/src/main/java/com/example/appengine/taskqueue/push/Worker.java (100%) rename appengine-java8/{taskqueue/push => taskqueues-push}/src/main/webapp/WEB-INF/appengine-web.xml (100%) rename appengine-java8/{taskqueue/push => taskqueues-push}/src/main/webapp/WEB-INF/web.xml (100%) rename appengine-java8/{taskqueue/push => taskqueues-push}/src/main/webapp/index.html (100%) rename appengine-java8/{taskqueue/push => taskqueues-push}/src/test/java/com/example/appengine/taskqueue/push/WorkerTest.java (100%) diff --git a/appengine-java8/datastore/indexes-exploding/pom.xml b/appengine-java8/datastore-indexes-exploding/pom.xml similarity index 98% rename from appengine-java8/datastore/indexes-exploding/pom.xml rename to appengine-java8/datastore-indexes-exploding/pom.xml index c0a049533bb..f39d35414d5 100644 --- a/appengine-java8/datastore/indexes-exploding/pom.xml +++ b/appengine-java8/datastore-indexes-exploding/pom.xml @@ -24,7 +24,7 @@ com.google.cloud appengine-java8-samples 1.0.0 - ../.. + .. diff --git a/appengine-java8/datastore/indexes-exploding/src/main/java/com/example/appengine/IndexesServlet.java b/appengine-java8/datastore-indexes-exploding/src/main/java/com/example/appengine/IndexesServlet.java similarity index 100% rename from appengine-java8/datastore/indexes-exploding/src/main/java/com/example/appengine/IndexesServlet.java rename to appengine-java8/datastore-indexes-exploding/src/main/java/com/example/appengine/IndexesServlet.java diff --git a/appengine-java8/datastore/indexes-exploding/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/datastore-indexes-exploding/src/main/webapp/WEB-INF/appengine-web.xml similarity index 100% rename from appengine-java8/datastore/indexes-exploding/src/main/webapp/WEB-INF/appengine-web.xml rename to appengine-java8/datastore-indexes-exploding/src/main/webapp/WEB-INF/appengine-web.xml diff --git a/appengine-java8/datastore/indexes-exploding/src/main/webapp/WEB-INF/datastore-indexes.xml b/appengine-java8/datastore-indexes-exploding/src/main/webapp/WEB-INF/datastore-indexes.xml similarity index 100% rename from appengine-java8/datastore/indexes-exploding/src/main/webapp/WEB-INF/datastore-indexes.xml rename to appengine-java8/datastore-indexes-exploding/src/main/webapp/WEB-INF/datastore-indexes.xml diff --git a/appengine-java8/datastore/indexes-exploding/src/main/webapp/WEB-INF/web.xml b/appengine-java8/datastore-indexes-exploding/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from appengine-java8/datastore/indexes-exploding/src/main/webapp/WEB-INF/web.xml rename to appengine-java8/datastore-indexes-exploding/src/main/webapp/WEB-INF/web.xml diff --git a/appengine-java8/datastore/indexes-exploding/src/test/java/com/example/appengine/IndexesServletTest.java b/appengine-java8/datastore-indexes-exploding/src/test/java/com/example/appengine/IndexesServletTest.java similarity index 100% rename from appengine-java8/datastore/indexes-exploding/src/test/java/com/example/appengine/IndexesServletTest.java rename to appengine-java8/datastore-indexes-exploding/src/test/java/com/example/appengine/IndexesServletTest.java diff --git a/appengine-java8/datastore/indexes-perfect/pom.xml b/appengine-java8/datastore-indexes-perfect/pom.xml similarity index 98% rename from appengine-java8/datastore/indexes-perfect/pom.xml rename to appengine-java8/datastore-indexes-perfect/pom.xml index 1e8359e42df..8a14336ba19 100644 --- a/appengine-java8/datastore/indexes-perfect/pom.xml +++ b/appengine-java8/datastore-indexes-perfect/pom.xml @@ -24,7 +24,7 @@ com.google.cloud appengine-java8-samples 1.0.0 - ../.. + .. diff --git a/appengine-java8/datastore/indexes-perfect/src/main/java/com/example/appengine/IndexesServlet.java b/appengine-java8/datastore-indexes-perfect/src/main/java/com/example/appengine/IndexesServlet.java similarity index 100% rename from appengine-java8/datastore/indexes-perfect/src/main/java/com/example/appengine/IndexesServlet.java rename to appengine-java8/datastore-indexes-perfect/src/main/java/com/example/appengine/IndexesServlet.java diff --git a/appengine-java8/datastore/indexes-perfect/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/datastore-indexes-perfect/src/main/webapp/WEB-INF/appengine-web.xml similarity index 100% rename from appengine-java8/datastore/indexes-perfect/src/main/webapp/WEB-INF/appengine-web.xml rename to appengine-java8/datastore-indexes-perfect/src/main/webapp/WEB-INF/appengine-web.xml diff --git a/appengine-java8/datastore/indexes-perfect/src/main/webapp/WEB-INF/datastore-indexes.xml b/appengine-java8/datastore-indexes-perfect/src/main/webapp/WEB-INF/datastore-indexes.xml similarity index 100% rename from appengine-java8/datastore/indexes-perfect/src/main/webapp/WEB-INF/datastore-indexes.xml rename to appengine-java8/datastore-indexes-perfect/src/main/webapp/WEB-INF/datastore-indexes.xml diff --git a/appengine-java8/datastore/indexes-perfect/src/main/webapp/WEB-INF/web.xml b/appengine-java8/datastore-indexes-perfect/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from appengine-java8/datastore/indexes-perfect/src/main/webapp/WEB-INF/web.xml rename to appengine-java8/datastore-indexes-perfect/src/main/webapp/WEB-INF/web.xml diff --git a/appengine-java8/datastore/indexes-perfect/src/test/java/com/example/appengine/IndexesServletTest.java b/appengine-java8/datastore-indexes-perfect/src/test/java/com/example/appengine/IndexesServletTest.java similarity index 100% rename from appengine-java8/datastore/indexes-perfect/src/test/java/com/example/appengine/IndexesServletTest.java rename to appengine-java8/datastore-indexes-perfect/src/test/java/com/example/appengine/IndexesServletTest.java diff --git a/appengine-java8/datastore/indexes/pom.xml b/appengine-java8/datastore-indexes/pom.xml similarity index 98% rename from appengine-java8/datastore/indexes/pom.xml rename to appengine-java8/datastore-indexes/pom.xml index 86d5cc7b8c2..1493f1c3bee 100644 --- a/appengine-java8/datastore/indexes/pom.xml +++ b/appengine-java8/datastore-indexes/pom.xml @@ -24,7 +24,7 @@ com.google.cloud appengine-java8-samples 1.0.0 - ../.. + .. diff --git a/appengine-java8/datastore/indexes/src/main/java/com/example/appengine/IndexesServlet.java b/appengine-java8/datastore-indexes/src/main/java/com/example/appengine/IndexesServlet.java similarity index 100% rename from appengine-java8/datastore/indexes/src/main/java/com/example/appengine/IndexesServlet.java rename to appengine-java8/datastore-indexes/src/main/java/com/example/appengine/IndexesServlet.java diff --git a/appengine-java8/datastore/indexes/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/datastore-indexes/src/main/webapp/WEB-INF/appengine-web.xml similarity index 100% rename from appengine-java8/datastore/indexes/src/main/webapp/WEB-INF/appengine-web.xml rename to appengine-java8/datastore-indexes/src/main/webapp/WEB-INF/appengine-web.xml diff --git a/appengine-java8/datastore/indexes/src/main/webapp/WEB-INF/datastore-indexes.xml b/appengine-java8/datastore-indexes/src/main/webapp/WEB-INF/datastore-indexes.xml similarity index 100% rename from appengine-java8/datastore/indexes/src/main/webapp/WEB-INF/datastore-indexes.xml rename to appengine-java8/datastore-indexes/src/main/webapp/WEB-INF/datastore-indexes.xml diff --git a/appengine-java8/datastore/indexes/src/main/webapp/WEB-INF/web.xml b/appengine-java8/datastore-indexes/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from appengine-java8/datastore/indexes/src/main/webapp/WEB-INF/web.xml rename to appengine-java8/datastore-indexes/src/main/webapp/WEB-INF/web.xml diff --git a/appengine-java8/datastore/indexes/src/test/java/com/example/appengine/IndexesServletTest.java b/appengine-java8/datastore-indexes/src/test/java/com/example/appengine/IndexesServletTest.java similarity index 100% rename from appengine-java8/datastore/indexes/src/test/java/com/example/appengine/IndexesServletTest.java rename to appengine-java8/datastore-indexes/src/test/java/com/example/appengine/IndexesServletTest.java diff --git a/appengine-java8/endpoints-frameworks-v2/README.md b/appengine-java8/endpoints-v2-README.md similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/README.md rename to appengine-java8/endpoints-v2-README.md diff --git a/appengine-java8/endpoints-frameworks-v2/backend/.gitignore b/appengine-java8/endpoints-v2-backend/.gitignore similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/backend/.gitignore rename to appengine-java8/endpoints-v2-backend/.gitignore diff --git a/appengine-java8/endpoints-frameworks-v2/backend/README.md b/appengine-java8/endpoints-v2-backend/README.md similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/backend/README.md rename to appengine-java8/endpoints-v2-backend/README.md diff --git a/appengine-java8/endpoints-frameworks-v2/backend/pom.xml b/appengine-java8/endpoints-v2-backend/pom.xml similarity index 99% rename from appengine-java8/endpoints-frameworks-v2/backend/pom.xml rename to appengine-java8/endpoints-v2-backend/pom.xml index 376be68c122..12af100ce6f 100644 --- a/appengine-java8/endpoints-frameworks-v2/backend/pom.xml +++ b/appengine-java8/endpoints-v2-backend/pom.xml @@ -25,7 +25,7 @@ appengine-java8-samples com.google.cloud 1.0.0 - ../.. + .. diff --git a/appengine-java8/endpoints-frameworks-v2/backend/src/main/java/com/example/echo/Echo.java b/appengine-java8/endpoints-v2-backend/src/main/java/com/example/echo/Echo.java similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/backend/src/main/java/com/example/echo/Echo.java rename to appengine-java8/endpoints-v2-backend/src/main/java/com/example/echo/Echo.java diff --git a/appengine-java8/endpoints-frameworks-v2/backend/src/main/java/com/example/echo/Email.java b/appengine-java8/endpoints-v2-backend/src/main/java/com/example/echo/Email.java similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/backend/src/main/java/com/example/echo/Email.java rename to appengine-java8/endpoints-v2-backend/src/main/java/com/example/echo/Email.java diff --git a/appengine-java8/endpoints-frameworks-v2/backend/src/main/java/com/example/echo/Message.java b/appengine-java8/endpoints-v2-backend/src/main/java/com/example/echo/Message.java similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/backend/src/main/java/com/example/echo/Message.java rename to appengine-java8/endpoints-v2-backend/src/main/java/com/example/echo/Message.java diff --git a/appengine-java8/endpoints-frameworks-v2/backend/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/endpoints-v2-backend/src/main/webapp/WEB-INF/appengine-web.xml similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/backend/src/main/webapp/WEB-INF/appengine-web.xml rename to appengine-java8/endpoints-v2-backend/src/main/webapp/WEB-INF/appengine-web.xml diff --git a/appengine-java8/endpoints-frameworks-v2/backend/src/main/webapp/WEB-INF/logging.properties b/appengine-java8/endpoints-v2-backend/src/main/webapp/WEB-INF/logging.properties similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/backend/src/main/webapp/WEB-INF/logging.properties rename to appengine-java8/endpoints-v2-backend/src/main/webapp/WEB-INF/logging.properties diff --git a/appengine-java8/endpoints-frameworks-v2/backend/src/main/webapp/WEB-INF/web.xml b/appengine-java8/endpoints-v2-backend/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/backend/src/main/webapp/WEB-INF/web.xml rename to appengine-java8/endpoints-v2-backend/src/main/webapp/WEB-INF/web.xml diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/README.md b/appengine-java8/endpoints-v2-migration/README.md similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/README.md rename to appengine-java8/endpoints-v2-migration/README.md diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/build.gradle b/appengine-java8/endpoints-v2-migration/build.gradle similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/build.gradle rename to appengine-java8/endpoints-v2-migration/build.gradle diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/gradle/wrapper/gradle-wrapper.properties b/appengine-java8/endpoints-v2-migration/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/gradle/wrapper/gradle-wrapper.properties rename to appengine-java8/endpoints-v2-migration/gradle/wrapper/gradle-wrapper.properties diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/gradlew b/appengine-java8/endpoints-v2-migration/gradlew similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/gradlew rename to appengine-java8/endpoints-v2-migration/gradlew diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/gradlew.bat b/appengine-java8/endpoints-v2-migration/gradlew.bat similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/gradlew.bat rename to appengine-java8/endpoints-v2-migration/gradlew.bat diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/jenkins.sh b/appengine-java8/endpoints-v2-migration/jenkins.sh similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/jenkins.sh rename to appengine-java8/endpoints-v2-migration/jenkins.sh diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/pom.xml b/appengine-java8/endpoints-v2-migration/pom.xml similarity index 99% rename from appengine-java8/endpoints-frameworks-v2/migration-example/pom.xml rename to appengine-java8/endpoints-v2-migration/pom.xml index 5694301ea67..4f80cfd455e 100644 --- a/appengine-java8/endpoints-frameworks-v2/migration-example/pom.xml +++ b/appengine-java8/endpoints-v2-migration/pom.xml @@ -26,7 +26,7 @@ limitations under the License. appengine-java8-samples com.google.cloud 1.0.0 - ../.. + .. diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Constants.java b/appengine-java8/endpoints-v2-migration/src/main/java/com/example/helloendpoints/Constants.java similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Constants.java rename to appengine-java8/endpoints-v2-migration/src/main/java/com/example/helloendpoints/Constants.java diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Greetings.java b/appengine-java8/endpoints-v2-migration/src/main/java/com/example/helloendpoints/Greetings.java similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Greetings.java rename to appengine-java8/endpoints-v2-migration/src/main/java/com/example/helloendpoints/Greetings.java diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/HelloGreeting.java b/appengine-java8/endpoints-v2-migration/src/main/java/com/example/helloendpoints/HelloGreeting.java similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/HelloGreeting.java rename to appengine-java8/endpoints-v2-migration/src/main/java/com/example/helloendpoints/HelloGreeting.java diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/endpoints-v2-migration/src/main/webapp/WEB-INF/appengine-web.xml similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/appengine-web.xml rename to appengine-java8/endpoints-v2-migration/src/main/webapp/WEB-INF/appengine-web.xml diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/logging.properties b/appengine-java8/endpoints-v2-migration/src/main/webapp/WEB-INF/logging.properties similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/logging.properties rename to appengine-java8/endpoints-v2-migration/src/main/webapp/WEB-INF/logging.properties diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml b/appengine-java8/endpoints-v2-migration/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml rename to appengine-java8/endpoints-v2-migration/src/main/webapp/WEB-INF/web.xml diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/bootstrap/css/bootstrap-responsive.css b/appengine-java8/endpoints-v2-migration/src/main/webapp/bootstrap/css/bootstrap-responsive.css similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/bootstrap/css/bootstrap-responsive.css rename to appengine-java8/endpoints-v2-migration/src/main/webapp/bootstrap/css/bootstrap-responsive.css diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/bootstrap/css/bootstrap.css b/appengine-java8/endpoints-v2-migration/src/main/webapp/bootstrap/css/bootstrap.css similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/bootstrap/css/bootstrap.css rename to appengine-java8/endpoints-v2-migration/src/main/webapp/bootstrap/css/bootstrap.css diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/css/style.css b/appengine-java8/endpoints-v2-migration/src/main/webapp/css/style.css similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/css/style.css rename to appengine-java8/endpoints-v2-migration/src/main/webapp/css/style.css diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/index.html b/appengine-java8/endpoints-v2-migration/src/main/webapp/index.html similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/index.html rename to appengine-java8/endpoints-v2-migration/src/main/webapp/index.html diff --git a/appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/js/base.js b/appengine-java8/endpoints-v2-migration/src/main/webapp/js/base.js similarity index 100% rename from appengine-java8/endpoints-frameworks-v2/migration-example/src/main/webapp/js/base.js rename to appengine-java8/endpoints-v2-migration/src/main/webapp/js/base.js diff --git a/appengine-java8/firebase-event-proxy/gae-firebase-listener-python/.gitignore b/appengine-java8/firebase-event-listener-python/.gitignore similarity index 100% rename from appengine-java8/firebase-event-proxy/gae-firebase-listener-python/.gitignore rename to appengine-java8/firebase-event-listener-python/.gitignore diff --git a/appengine-java8/firebase-event-proxy/gae-firebase-listener-python/app.yaml b/appengine-java8/firebase-event-listener-python/app.yaml similarity index 100% rename from appengine-java8/firebase-event-proxy/gae-firebase-listener-python/app.yaml rename to appengine-java8/firebase-event-listener-python/app.yaml diff --git a/appengine-java8/firebase-event-proxy/gae-firebase-listener-python/main.py b/appengine-java8/firebase-event-listener-python/main.py similarity index 100% rename from appengine-java8/firebase-event-proxy/gae-firebase-listener-python/main.py rename to appengine-java8/firebase-event-listener-python/main.py diff --git a/appengine-java8/firebase-event-proxy/README.md b/appengine-java8/firebase-event-proxy-README.md similarity index 100% rename from appengine-java8/firebase-event-proxy/README.md rename to appengine-java8/firebase-event-proxy-README.md diff --git a/appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/pom.xml b/appengine-java8/firebase-event-proxy/pom.xml similarity index 98% rename from appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/pom.xml rename to appengine-java8/firebase-event-proxy/pom.xml index 374ce1fa4cf..3ef0cb15212 100644 --- a/appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/pom.xml +++ b/appengine-java8/firebase-event-proxy/pom.xml @@ -24,7 +24,7 @@ com.google.cloud appengine-java8-samples 1.0.0 - ../.. + .. diff --git a/appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/java/com/example/GaeFirebaseEventProxy/FirebaseEventProxy.java b/appengine-java8/firebase-event-proxy/src/main/java/com/example/GaeFirebaseEventProxy/FirebaseEventProxy.java similarity index 100% rename from appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/java/com/example/GaeFirebaseEventProxy/FirebaseEventProxy.java rename to appengine-java8/firebase-event-proxy/src/main/java/com/example/GaeFirebaseEventProxy/FirebaseEventProxy.java diff --git a/appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/java/com/example/GaeFirebaseEventProxy/ServletContextListenerImpl.java b/appengine-java8/firebase-event-proxy/src/main/java/com/example/GaeFirebaseEventProxy/ServletContextListenerImpl.java similarity index 100% rename from appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/java/com/example/GaeFirebaseEventProxy/ServletContextListenerImpl.java rename to appengine-java8/firebase-event-proxy/src/main/java/com/example/GaeFirebaseEventProxy/ServletContextListenerImpl.java diff --git a/appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/firebase-event-proxy/src/main/webapp/WEB-INF/appengine-web.xml similarity index 100% rename from appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/webapp/WEB-INF/appengine-web.xml rename to appengine-java8/firebase-event-proxy/src/main/webapp/WEB-INF/appengine-web.xml diff --git a/appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/webapp/WEB-INF/logging.properties b/appengine-java8/firebase-event-proxy/src/main/webapp/WEB-INF/logging.properties similarity index 100% rename from appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/webapp/WEB-INF/logging.properties rename to appengine-java8/firebase-event-proxy/src/main/webapp/WEB-INF/logging.properties diff --git a/appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/webapp/WEB-INF/web.xml b/appengine-java8/firebase-event-proxy/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/webapp/WEB-INF/web.xml rename to appengine-java8/firebase-event-proxy/src/main/webapp/WEB-INF/web.xml diff --git a/appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/webapp/index.jsp b/appengine-java8/firebase-event-proxy/src/main/webapp/index.jsp similarity index 100% rename from appengine-java8/firebase-event-proxy/gae-firebase-event-proxy/src/main/webapp/index.jsp rename to appengine-java8/firebase-event-proxy/src/main/webapp/index.jsp diff --git a/appengine-java8/pom.xml b/appengine-java8/pom.xml index dc39478adca..78d7d192c8e 100644 --- a/appengine-java8/pom.xml +++ b/appengine-java8/pom.xml @@ -41,13 +41,14 @@ cloudsql datastore - datastore/indexes - datastore/indexes-exploding - datastore/indexes-perfect + datastore-indexes + datastore-indexes-exploding + datastore-indexes-perfect - endpoints-frameworks-v2/backend + endpoints-v2-backend + endpoints-v2-migration - firebase-event-proxy/gae-firebase-event-proxy + firebase-event-proxy firebase-tictactoe @@ -65,14 +66,14 @@ search sendgrid - remote/remote-client - remote/remote-server + remote/client + remote-server static-files - taskqueue/deferred - taskqueue/pull - taskqueue/push + taskqueues-deferred + taskqueues-pull + taskqueues-push twilio diff --git a/appengine-java8/remote/remote-server/pom.xml b/appengine-java8/remote-server/pom.xml similarity index 98% rename from appengine-java8/remote/remote-server/pom.xml rename to appengine-java8/remote-server/pom.xml index 1eff745a61e..1c17e738a64 100644 --- a/appengine-java8/remote/remote-server/pom.xml +++ b/appengine-java8/remote-server/pom.xml @@ -24,7 +24,7 @@ appengine-java8-samples com.google.cloud 1.0.0 - ../.. + .. diff --git a/appengine-java8/remote/remote-server/src/main/java/com/example/appengine/remote/RemoteServlet.java b/appengine-java8/remote-server/src/main/java/com/example/appengine/remote/RemoteServlet.java similarity index 100% rename from appengine-java8/remote/remote-server/src/main/java/com/example/appengine/remote/RemoteServlet.java rename to appengine-java8/remote-server/src/main/java/com/example/appengine/remote/RemoteServlet.java diff --git a/appengine-java8/remote/remote-server/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/remote-server/src/main/webapp/WEB-INF/appengine-web.xml similarity index 100% rename from appengine-java8/remote/remote-server/src/main/webapp/WEB-INF/appengine-web.xml rename to appengine-java8/remote-server/src/main/webapp/WEB-INF/appengine-web.xml diff --git a/appengine-java8/remote/remote-server/src/main/webapp/WEB-INF/web.xml b/appengine-java8/remote-server/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from appengine-java8/remote/remote-server/src/main/webapp/WEB-INF/web.xml rename to appengine-java8/remote-server/src/main/webapp/WEB-INF/web.xml diff --git a/appengine-java8/remote/remote-client/pom.xml b/appengine-java8/remote/client/pom.xml similarity index 100% rename from appengine-java8/remote/remote-client/pom.xml rename to appengine-java8/remote/client/pom.xml diff --git a/appengine-java8/remote/remote-client/src/main/java/com/example/appengine/remote/RemoteApiExample.java b/appengine-java8/remote/client/src/main/java/com/example/appengine/remote/RemoteApiExample.java similarity index 100% rename from appengine-java8/remote/remote-client/src/main/java/com/example/appengine/remote/RemoteApiExample.java rename to appengine-java8/remote/client/src/main/java/com/example/appengine/remote/RemoteApiExample.java diff --git a/appengine-java8/taskqueue/README.md b/appengine-java8/taskqueue-README.md similarity index 100% rename from appengine-java8/taskqueue/README.md rename to appengine-java8/taskqueue-README.md diff --git a/appengine-java8/taskqueue/deferred/README.md b/appengine-java8/taskqueues-deferred/README.md similarity index 100% rename from appengine-java8/taskqueue/deferred/README.md rename to appengine-java8/taskqueues-deferred/README.md diff --git a/appengine-java8/taskqueue/deferred/pom.xml b/appengine-java8/taskqueues-deferred/pom.xml similarity index 98% rename from appengine-java8/taskqueue/deferred/pom.xml rename to appengine-java8/taskqueues-deferred/pom.xml index 13254ab6c1a..1c69e62912e 100644 --- a/appengine-java8/taskqueue/deferred/pom.xml +++ b/appengine-java8/taskqueues-deferred/pom.xml @@ -25,7 +25,7 @@ appengine-java8-samples com.google.cloud 1.0.0 - ../.. + .. diff --git a/appengine-java8/taskqueue/deferred/src/main/java/com/google/cloud/taskqueue/samples/DeferSampleServlet.java b/appengine-java8/taskqueues-deferred/src/main/java/com/google/cloud/taskqueue/samples/DeferSampleServlet.java similarity index 100% rename from appengine-java8/taskqueue/deferred/src/main/java/com/google/cloud/taskqueue/samples/DeferSampleServlet.java rename to appengine-java8/taskqueues-deferred/src/main/java/com/google/cloud/taskqueue/samples/DeferSampleServlet.java diff --git a/appengine-java8/taskqueue/deferred/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/taskqueues-deferred/src/main/webapp/WEB-INF/appengine-web.xml similarity index 100% rename from appengine-java8/taskqueue/deferred/src/main/webapp/WEB-INF/appengine-web.xml rename to appengine-java8/taskqueues-deferred/src/main/webapp/WEB-INF/appengine-web.xml diff --git a/appengine-java8/taskqueue/deferred/src/main/webapp/WEB-INF/logging.properties b/appengine-java8/taskqueues-deferred/src/main/webapp/WEB-INF/logging.properties similarity index 100% rename from appengine-java8/taskqueue/deferred/src/main/webapp/WEB-INF/logging.properties rename to appengine-java8/taskqueues-deferred/src/main/webapp/WEB-INF/logging.properties diff --git a/appengine-java8/taskqueue/deferred/src/main/webapp/WEB-INF/web.xml b/appengine-java8/taskqueues-deferred/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from appengine-java8/taskqueue/deferred/src/main/webapp/WEB-INF/web.xml rename to appengine-java8/taskqueues-deferred/src/main/webapp/WEB-INF/web.xml diff --git a/appengine-java8/taskqueue/deferred/src/main/webapp/guestbook.jsp b/appengine-java8/taskqueues-deferred/src/main/webapp/guestbook.jsp similarity index 100% rename from appengine-java8/taskqueue/deferred/src/main/webapp/guestbook.jsp rename to appengine-java8/taskqueues-deferred/src/main/webapp/guestbook.jsp diff --git a/appengine-java8/taskqueue/pull/README.md b/appengine-java8/taskqueues-pull/README.md similarity index 100% rename from appengine-java8/taskqueue/pull/README.md rename to appengine-java8/taskqueues-pull/README.md diff --git a/appengine-java8/taskqueue/pull/pom.xml b/appengine-java8/taskqueues-pull/pom.xml similarity index 98% rename from appengine-java8/taskqueue/pull/pom.xml rename to appengine-java8/taskqueues-pull/pom.xml index 68c6ed7fae0..a7b1b1a6f7c 100644 --- a/appengine-java8/taskqueue/pull/pom.xml +++ b/appengine-java8/taskqueues-pull/pom.xml @@ -26,7 +26,7 @@ Copyright 2016 Google Inc. appengine-java8-samples com.google.cloud 1.0.0 - ../.. + .. diff --git a/appengine-java8/taskqueue/pull/src/main/java/com/example/taskqueue/TaskqueueServlet.java b/appengine-java8/taskqueues-pull/src/main/java/com/example/taskqueue/TaskqueueServlet.java similarity index 100% rename from appengine-java8/taskqueue/pull/src/main/java/com/example/taskqueue/TaskqueueServlet.java rename to appengine-java8/taskqueues-pull/src/main/java/com/example/taskqueue/TaskqueueServlet.java diff --git a/appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/taskqueues-pull/src/main/webapp/WEB-INF/appengine-web.xml similarity index 100% rename from appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/appengine-web.xml rename to appengine-java8/taskqueues-pull/src/main/webapp/WEB-INF/appengine-web.xml diff --git a/appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/logging.properties b/appengine-java8/taskqueues-pull/src/main/webapp/WEB-INF/logging.properties similarity index 100% rename from appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/logging.properties rename to appengine-java8/taskqueues-pull/src/main/webapp/WEB-INF/logging.properties diff --git a/appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/queue.xml b/appengine-java8/taskqueues-pull/src/main/webapp/WEB-INF/queue.xml similarity index 100% rename from appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/queue.xml rename to appengine-java8/taskqueues-pull/src/main/webapp/WEB-INF/queue.xml diff --git a/appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/web.xml b/appengine-java8/taskqueues-pull/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from appengine-java8/taskqueue/pull/src/main/webapp/WEB-INF/web.xml rename to appengine-java8/taskqueues-pull/src/main/webapp/WEB-INF/web.xml diff --git a/appengine-java8/taskqueue/pull/src/main/webapp/tasks.jsp b/appengine-java8/taskqueues-pull/src/main/webapp/tasks.jsp similarity index 100% rename from appengine-java8/taskqueue/pull/src/main/webapp/tasks.jsp rename to appengine-java8/taskqueues-pull/src/main/webapp/tasks.jsp diff --git a/appengine-java8/taskqueue/push/README.md b/appengine-java8/taskqueues-push/README.md similarity index 100% rename from appengine-java8/taskqueue/push/README.md rename to appengine-java8/taskqueues-push/README.md diff --git a/appengine-java8/taskqueue/push/pom.xml b/appengine-java8/taskqueues-push/pom.xml similarity index 98% rename from appengine-java8/taskqueue/push/pom.xml rename to appengine-java8/taskqueues-push/pom.xml index 7274ac04056..fdbfa15702e 100644 --- a/appengine-java8/taskqueue/push/pom.xml +++ b/appengine-java8/taskqueues-push/pom.xml @@ -25,7 +25,7 @@ Copyright 2016 Google Inc. com.google.cloud appengine-java8-samples 1.0.0 - ../.. + .. diff --git a/appengine-java8/taskqueue/push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java b/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java similarity index 100% rename from appengine-java8/taskqueue/push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java rename to appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java diff --git a/appengine-java8/taskqueue/push/src/main/java/com/example/appengine/taskqueue/push/Worker.java b/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Worker.java similarity index 100% rename from appengine-java8/taskqueue/push/src/main/java/com/example/appengine/taskqueue/push/Worker.java rename to appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Worker.java diff --git a/appengine-java8/taskqueue/push/src/main/webapp/WEB-INF/appengine-web.xml b/appengine-java8/taskqueues-push/src/main/webapp/WEB-INF/appengine-web.xml similarity index 100% rename from appengine-java8/taskqueue/push/src/main/webapp/WEB-INF/appengine-web.xml rename to appengine-java8/taskqueues-push/src/main/webapp/WEB-INF/appengine-web.xml diff --git a/appengine-java8/taskqueue/push/src/main/webapp/WEB-INF/web.xml b/appengine-java8/taskqueues-push/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from appengine-java8/taskqueue/push/src/main/webapp/WEB-INF/web.xml rename to appengine-java8/taskqueues-push/src/main/webapp/WEB-INF/web.xml diff --git a/appengine-java8/taskqueue/push/src/main/webapp/index.html b/appengine-java8/taskqueues-push/src/main/webapp/index.html similarity index 100% rename from appengine-java8/taskqueue/push/src/main/webapp/index.html rename to appengine-java8/taskqueues-push/src/main/webapp/index.html diff --git a/appengine-java8/taskqueue/push/src/test/java/com/example/appengine/taskqueue/push/WorkerTest.java b/appengine-java8/taskqueues-push/src/test/java/com/example/appengine/taskqueue/push/WorkerTest.java similarity index 100% rename from appengine-java8/taskqueue/push/src/test/java/com/example/appengine/taskqueue/push/WorkerTest.java rename to appengine-java8/taskqueues-push/src/test/java/com/example/appengine/taskqueue/push/WorkerTest.java