From 072de410e1865c32b9f53e96c8f1638b8692ccd0 Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Thu, 10 May 2018 15:15:31 -0700 Subject: [PATCH 1/4] Add tags to CloudSQL samples (#1100) * Added tags for plugins. * Add tags to config.properties. --- appengine-java8/cloudsql-postgres/pom.xml | 3 ++- appengine-java8/cloudsql/pom.xml | 3 ++- flexible/cloudsql/src/main/resources/config.properties | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/appengine-java8/cloudsql-postgres/pom.xml b/appengine-java8/cloudsql-postgres/pom.xml index 14eba545748..7221f865b7c 100644 --- a/appengine-java8/cloudsql-postgres/pom.xml +++ b/appengine-java8/cloudsql-postgres/pom.xml @@ -88,6 +88,7 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + org.apache.maven.plugins maven-war-plugin @@ -113,7 +114,7 @@ true - + diff --git a/appengine-java8/cloudsql/pom.xml b/appengine-java8/cloudsql/pom.xml index 00cf1dd1fd3..078480d7c1e 100644 --- a/appengine-java8/cloudsql/pom.xml +++ b/appengine-java8/cloudsql/pom.xml @@ -88,6 +88,7 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + org.apache.maven.plugins maven-war-plugin @@ -113,7 +114,7 @@ true - + diff --git a/flexible/cloudsql/src/main/resources/config.properties b/flexible/cloudsql/src/main/resources/config.properties index 649e37bf67b..b5f068b443e 100644 --- a/flexible/cloudsql/src/main/resources/config.properties +++ b/flexible/cloudsql/src/main/resources/config.properties @@ -11,5 +11,6 @@ # 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. - +# [START properties] sqlUrl=${sqlURL} +# [END properties] From 454a322a3b3757377fd3993b06425067483e2f1f Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Fri, 11 May 2018 15:37:10 -0700 Subject: [PATCH 2/4] Add more tags for CloudSQL samples (#1101) --- appengine/cloudsql/pom.xml | 15 +++++++-------- flexible/cloudsql/pom.xml | 4 ++-- flexible/postgres/pom.xml | 2 ++ .../postgres/src/main/resources/config.properties | 3 ++- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/appengine/cloudsql/pom.xml b/appengine/cloudsql/pom.xml index 215428bdba5..3db4aaa398c 100644 --- a/appengine/cloudsql/pom.xml +++ b/appengine/cloudsql/pom.xml @@ -88,6 +88,7 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + org.apache.maven.plugins maven-war-plugin @@ -104,18 +105,16 @@ - - - com.google.appengine - appengine-maven-plugin - 1.9.59 + 1.3.1 + + true + true + + diff --git a/flexible/cloudsql/pom.xml b/flexible/cloudsql/pom.xml index e91fafe4c83..00d40632687 100644 --- a/flexible/cloudsql/pom.xml +++ b/flexible/cloudsql/pom.xml @@ -89,22 +89,22 @@ + src/main/resources true + ${project.build.directory}/${project.build.finalName}/WEB-INF/classes - com.google.cloud.tools appengine-maven-plugin 1.3.1 - org.eclipse.jetty jetty-maven-plugin diff --git a/flexible/postgres/pom.xml b/flexible/postgres/pom.xml index a1a16214f4e..59b2b7031ed 100644 --- a/flexible/postgres/pom.xml +++ b/flexible/postgres/pom.xml @@ -90,12 +90,14 @@ + src/main/resources true + ${project.build.directory}/${project.build.finalName}/WEB-INF/classes diff --git a/flexible/postgres/src/main/resources/config.properties b/flexible/postgres/src/main/resources/config.properties index ae75c10fb77..3bd935fd515 100644 --- a/flexible/postgres/src/main/resources/config.properties +++ b/flexible/postgres/src/main/resources/config.properties @@ -11,5 +11,6 @@ # 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. - +# [START properties] sqlUrl=${sqlURL} +# [END properties] From 41603e3cc82ddd22b44d9f298e91d5d49fb30689 Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Wed, 16 May 2018 14:41:11 -0700 Subject: [PATCH 3/4] Update region tags (#1103) * Update logback.xml * Update logging.properties * Update Quickstart.java * Update Quickstart.java --- .../jul/src/main/java/com/example/logging/jul/Quickstart.java | 4 ++-- logging/jul/src/main/resources/logging.properties | 4 ++-- .../src/main/java/com/example/logging/logback/Quickstart.java | 4 ++-- logging/logback/src/main/resources/logback.xml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/logging/jul/src/main/java/com/example/logging/jul/Quickstart.java b/logging/jul/src/main/java/com/example/logging/jul/Quickstart.java index 85b18addd1a..abaf01f1b2c 100644 --- a/logging/jul/src/main/java/com/example/logging/jul/Quickstart.java +++ b/logging/jul/src/main/java/com/example/logging/jul/Quickstart.java @@ -16,7 +16,7 @@ package com.example.logging.jul; -// [START jul_quickstart] +// [START logging_jul_quickstart] import java.util.logging.Logger; @@ -28,4 +28,4 @@ public static void main(String[] args) { logger.severe("Logging ERROR with java.util.logging"); } } -// [END jul_quickstart] \ No newline at end of file +// [END logging_jul_quickstart] diff --git a/logging/jul/src/main/resources/logging.properties b/logging/jul/src/main/resources/logging.properties index 1d7d0cf9f19..ba131a94036 100644 --- a/logging/jul/src/main/resources/logging.properties +++ b/logging/jul/src/main/resources/logging.properties @@ -15,7 +15,7 @@ # A default java.util.logging configuration. # -# [START jul_config] +# [START logging_jul_config] # To use this configuration, add to system properties : -Djava.util.logging.config.file="/path/to/file" # .level = INFO @@ -44,4 +44,4 @@ java.util.logging.SimpleFormatter.format=%3$s: %5$s%6$s #optional enhancers (to add additional fields, labels) com.google.cloud.logging.LoggingHandler.enhancers=com.example.logging.jul.enhancers.ExampleEnhancer -# [END jul_config] \ No newline at end of file +# [END logging_jul_config] diff --git a/logging/logback/src/main/java/com/example/logging/logback/Quickstart.java b/logging/logback/src/main/java/com/example/logging/logback/Quickstart.java index bcbf5217852..b7bc7bedb20 100644 --- a/logging/logback/src/main/java/com/example/logging/logback/Quickstart.java +++ b/logging/logback/src/main/java/com/example/logging/logback/Quickstart.java @@ -16,7 +16,7 @@ package com.example.logging.logback; -// [START logback_quickstart] +// [START logging_logback_quickstart] import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -29,4 +29,4 @@ public static void main(String[] args) { logger.error("Logging ERROR with Logback"); } } -// [END logback_quickstart] \ No newline at end of file +// [END logging_logback_quickstart] diff --git a/logging/logback/src/main/resources/logback.xml b/logging/logback/src/main/resources/logback.xml index fe3c54873b8..5be8c9e13d6 100644 --- a/logging/logback/src/main/resources/logback.xml +++ b/logging/logback/src/main/resources/logback.xml @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - + @@ -30,4 +30,4 @@ - + From 131dcfe33b22bd1b5b6f9d1b37a6777ccb5ba7ae Mon Sep 17 00:00:00 2001 From: Ossama Alami Date: Wed, 16 May 2018 14:47:17 -0700 Subject: [PATCH 4/4] update iap region tags (#1104) --- iap/src/main/java/com/example/iap/BuildIapRequest.java | 4 ++-- iap/src/main/java/com/example/iap/VerifyIapRequestHeader.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iap/src/main/java/com/example/iap/BuildIapRequest.java b/iap/src/main/java/com/example/iap/BuildIapRequest.java index a1324693b6a..4b3a4aad676 100644 --- a/iap/src/main/java/com/example/iap/BuildIapRequest.java +++ b/iap/src/main/java/com/example/iap/BuildIapRequest.java @@ -15,7 +15,7 @@ */ package com.example.iap; -// [START generate_iap_request] +// [START iap_make_request] import com.google.api.client.http.GenericUrl; import com.google.api.client.http.HttpHeaders; @@ -150,4 +150,4 @@ public static HttpRequest buildIapRequest(HttpRequest request, String iapClientI .setHeaders(httpHeaders); } } -// [END generate_iap_request] +// [END iap_make_request] diff --git a/iap/src/main/java/com/example/iap/VerifyIapRequestHeader.java b/iap/src/main/java/com/example/iap/VerifyIapRequestHeader.java index 9f53ccd09af..61503264456 100644 --- a/iap/src/main/java/com/example/iap/VerifyIapRequestHeader.java +++ b/iap/src/main/java/com/example/iap/VerifyIapRequestHeader.java @@ -15,7 +15,7 @@ */ package com.example.iap; -// [START verify_iap_request] +// [START iap_validate_jwt] import com.google.api.client.http.HttpRequest; import com.google.common.base.Preconditions; @@ -130,4 +130,4 @@ private boolean verifyJwt(String jwtToken, String expectedAudience) throws Excep return signedJwt.verify(jwsVerifier); } } -// [END verify_iap_request] +// [END iap_validate_jwt]