diff --git a/.travis.yml b/.travis.yml index 35338d03867..351b5ca3e2e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,6 @@ env: before_install: - openssl aes-256-cbc -K $encrypted_99d8b304f94b_key -iv $encrypted_99d8b304f94b_iv -in service-account.json.enc -out service-account.json -d -script: mvn test +script: mvn verify after_success: - mvn clean cobertura:cobertura coveralls:report diff --git a/appengine/analytics/pom.xml b/appengine/analytics/pom.xml index 1bbf59f21bf..168757d6ba7 100644 --- a/appengine/analytics/pom.xml +++ b/appengine/analytics/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - analytics + appengine-analytics org.apache.httpcomponents @@ -49,6 +49,20 @@ true + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/appidentity/pom.xml b/appengine/appidentity/pom.xml index c0012f2c939..6117fce98c9 100644 --- a/appengine/appidentity/pom.xml +++ b/appengine/appidentity/pom.xml @@ -20,7 +20,7 @@ Copyright 2015 Google Inc. All Rights Reserved. war 1.0-SNAPSHOT com.example.appengine - appidentity + appengine-appidentity 1.9.30 @@ -107,6 +107,20 @@ Copyright 2015 Google Inc. All Rights Reserved. gcloud-maven-plugin 2.0.9.90.v20151210 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java b/appengine/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java index d10cf3efed5..bbc2237cfc9 100644 --- a/appengine/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java +++ b/appengine/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java @@ -17,10 +17,8 @@ package com.example.appengine.appidentity; import com.google.apphosting.api.ApiProxy; -import com.google.apphosting.api.ApiProxy.Environment; import java.io.IOException; -import java.io.PrintWriter; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; diff --git a/appengine/cloudsql/pom.xml b/appengine/cloudsql/pom.xml index 836eea0c44d..3d7202f7f10 100644 --- a/appengine/cloudsql/pom.xml +++ b/appengine/cloudsql/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - cloudsql + appengine-cloudsql javax.servlet @@ -51,6 +51,20 @@ true + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/cloudstorage/pom.xml b/appengine/cloudstorage/pom.xml index 0a9229f7578..fae565f6bc9 100644 --- a/appengine/cloudstorage/pom.xml +++ b/appengine/cloudstorage/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - cloudstorage + appengine-cloudstorage javax.servlet @@ -49,6 +49,20 @@ true + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/datastore/pom.xml b/appengine/datastore/pom.xml index abaa344731c..80357f8179c 100644 --- a/appengine/datastore/pom.xml +++ b/appengine/datastore/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - datastore + appengine-datastore javax.servlet @@ -49,6 +49,20 @@ true + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/disk/pom.xml b/appengine/disk/pom.xml index 477410f383d..503180f6aff 100644 --- a/appengine/disk/pom.xml +++ b/appengine/disk/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - disk + appengine-disk javax.servlet @@ -41,6 +41,20 @@ gcloud-maven-plugin 2.0.9.90.v20151210 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/disk/src/main/java/com/example/managedvms/disk/DiskServlet.java b/appengine/disk/src/main/java/com/example/managedvms/disk/DiskServlet.java index 7f711ad060a..cdca638c98a 100644 --- a/appengine/disk/src/main/java/com/example/managedvms/disk/DiskServlet.java +++ b/appengine/disk/src/main/java/com/example/managedvms/disk/DiskServlet.java @@ -46,7 +46,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc StringBuffer sb = new StringBuffer(); List strings = Files.readAllLines(tmpFile, StandardCharsets.US_ASCII); for (String s : strings) { - sb.append(s+"\n"); + sb.append(s + "\n"); } PrintWriter out = resp.getWriter(); resp.setContentType("text/plain"); diff --git a/appengine/extending-runtime/pom.xml b/appengine/extending-runtime/pom.xml index 82e549bc511..2bf737f6bb0 100644 --- a/appengine/extending-runtime/pom.xml +++ b/appengine/extending-runtime/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - extendingruntime + appengine-extendingruntime @@ -58,6 +58,20 @@ + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/helloworld-mvm/pom.xml b/appengine/helloworld-mvm/pom.xml index 6082091e5b3..40d601d137d 100644 --- a/appengine/helloworld-mvm/pom.xml +++ b/appengine/helloworld-mvm/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - helloworld + appengine-helloworld-mvm javax.servlet @@ -41,6 +41,20 @@ gcloud-maven-plugin 2.0.9.90.v20151210 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/helloworld/pom.xml b/appengine/helloworld/pom.xml index 0920353cb51..b415238fcf3 100644 --- a/appengine/helloworld/pom.xml +++ b/appengine/helloworld/pom.xml @@ -20,7 +20,7 @@ Copyright 2015 Google Inc. All Rights Reserved. war 1.0-SNAPSHOT com.example.appengine - helloworld + appengine-helloworld javax.servlet @@ -48,6 +48,20 @@ Copyright 2015 Google Inc. All Rights Reserved. appengine-maven-plugin 1.9.31 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/mailgun/pom.xml b/appengine/mailgun/pom.xml index 3a49457b747..9f5b98a1098 100644 --- a/appengine/mailgun/pom.xml +++ b/appengine/mailgun/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - mailgun + appengine-mailgun javax.servlet @@ -58,6 +58,20 @@ gcloud-maven-plugin 2.0.9.90.v20151210 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/memcache/pom.xml b/appengine/memcache/pom.xml index ce5ad67fdc4..34d0fb4cfcf 100644 --- a/appengine/memcache/pom.xml +++ b/appengine/memcache/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - memcache + appengine-memcache javax.servlet @@ -46,6 +46,20 @@ gcloud-maven-plugin 2.0.9.90.v20151210 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/sendgrid/pom.xml b/appengine/sendgrid/pom.xml index c54912dd089..a0410dfdb65 100644 --- a/appengine/sendgrid/pom.xml +++ b/appengine/sendgrid/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - sendgrid + appengine-sendgrid javax.servlet @@ -48,6 +48,24 @@ gcloud-maven-plugin 2.0.9.90.v20151210 + diff --git a/appengine/static-files/pom.xml b/appengine/static-files/pom.xml index 73d7fade5df..1e48928c20d 100644 --- a/appengine/static-files/pom.xml +++ b/appengine/static-files/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - staticfiles + appengine-staticfiles javax.servlet @@ -41,6 +41,20 @@ gcloud-maven-plugin 2.0.9.90.v20151210 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/twilio/pom.xml b/appengine/twilio/pom.xml index 94801259c2d..f2d44aabd34 100644 --- a/appengine/twilio/pom.xml +++ b/appengine/twilio/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - twilio + appengine-twilio @@ -49,6 +49,24 @@ gcloud-maven-plugin 2.0.9.90.v20151210 + diff --git a/appengine/twilio/src/main/java/com/example/managedvms/twilio/ReceiveSmsServlet.java b/appengine/twilio/src/main/java/com/example/managedvms/twilio/ReceiveSmsServlet.java index a4796bac9d2..5d289da692c 100644 --- a/appengine/twilio/src/main/java/com/example/managedvms/twilio/ReceiveSmsServlet.java +++ b/appengine/twilio/src/main/java/com/example/managedvms/twilio/ReceiveSmsServlet.java @@ -43,7 +43,7 @@ public void service(HttpServletRequest request, HttpServletResponse response) th TwiMLResponse twiml = new TwiMLResponse(); Message sms = new Message(message); try { - twiml.append(sms); + twiml.append(sms); } catch (TwiMLException e) { throw new ServletException("Twilio error", e); } diff --git a/appengine/twilio/src/main/java/com/example/managedvms/twilio/SendSmsServlet.java b/appengine/twilio/src/main/java/com/example/managedvms/twilio/SendSmsServlet.java index 3e727f1a3e8..9b1ecb4ec63 100644 --- a/appengine/twilio/src/main/java/com/example/managedvms/twilio/SendSmsServlet.java +++ b/appengine/twilio/src/main/java/com/example/managedvms/twilio/SendSmsServlet.java @@ -16,14 +16,13 @@ package com.example.managedvms.twilio; -import org.apache.http.NameValuePair; -import org.apache.http.message.BasicNameValuePair; - import com.twilio.sdk.TwilioRestClient; import com.twilio.sdk.TwilioRestException; import com.twilio.sdk.resource.factory.MessageFactory; import com.twilio.sdk.resource.instance.Account; import com.twilio.sdk.resource.instance.Message; +import org.apache.http.NameValuePair; +import org.apache.http.message.BasicNameValuePair; import java.io.IOException; import java.util.ArrayList; diff --git a/appengine/websockets/pom.xml b/appengine/websockets/pom.xml index ef8adfc8338..eccc3d64c11 100644 --- a/appengine/websockets/pom.xml +++ b/appengine/websockets/pom.xml @@ -5,7 +5,7 @@ war 1.0-SNAPSHOT com.example.managedvms - websockets + appengine-websockets javax.servlet @@ -71,6 +71,20 @@ gcloud-maven-plugin 2.0.9.90.v20151210 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/appengine/websockets/src/main/java/com/example/managedvms/websockets/WebsocketServlet.java b/appengine/websockets/src/main/java/com/example/managedvms/websockets/WebsocketServlet.java index 3bfde7ac350..d9487b731a2 100644 --- a/appengine/websockets/src/main/java/com/example/managedvms/websockets/WebsocketServlet.java +++ b/appengine/websockets/src/main/java/com/example/managedvms/websockets/WebsocketServlet.java @@ -57,6 +57,9 @@ public void service(HttpServletRequest req, HttpServletResponse resp) throws IOE req.getRequestDispatcher("/index.jsp").forward(req, resp); } + /** + * Returns the static IP address of the compute node this servlet is running on. + */ public static String getExternalIp() { try { URL url = new URL(METADATA_NETWORK_INTERFACE_URL); diff --git a/bigquery/pom.xml b/bigquery/pom.xml index 47f38c9298b..3e19201d04b 100644 --- a/bigquery/pom.xml +++ b/bigquery/pom.xml @@ -81,6 +81,20 @@ 5 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../google-checks.xml + true + true + true + + + check + + diff --git a/logging/pom.xml b/logging/pom.xml index eb803b986bb..f6d82b8dab0 100644 --- a/logging/pom.xml +++ b/logging/pom.xml @@ -55,6 +55,20 @@ 5 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../google-checks.xml + true + true + true + + + check + + diff --git a/managedvms/sparkjava/pom.xml b/managedvms/sparkjava/pom.xml index 49ea74e938e..b9115657517 100644 --- a/managedvms/sparkjava/pom.xml +++ b/managedvms/sparkjava/pom.xml @@ -61,7 +61,7 @@ com.google.appengine.sparkdemo.Main - + @@ -84,6 +84,24 @@ + diff --git a/monitoring/pom.xml b/monitoring/pom.xml index 0e77711d9b5..d2a13eadee3 100644 --- a/monitoring/pom.xml +++ b/monitoring/pom.xml @@ -63,6 +63,20 @@ 5 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../google-checks.xml + true + true + true + + + check + + diff --git a/pom.xml b/pom.xml index 421f19cf143..be2fc03c989 100644 --- a/pom.xml +++ b/pom.xml @@ -23,16 +23,31 @@ + appengine/analytics appengine/appidentity - taskqueue/deferred - unittests + appengine/cloudsql + appengine/cloudstorage + appengine/datastore + appengine/disk + appengine/extending-runtime + appengine/helloworld + appengine/helloworld-mvm + appengine/mailgun + appengine/memcache + appengine/sendgrid + appengine/static-files + appengine/twilio + appengine/websockets bigquery - storage/xml-api/cmdline-sample - storage/xml-api/serviceaccount-appengine-sample - storage/storage-transfer - monitoring logging managedvms/sparkjava + monitoring + storage/json-api + storage/storage-transfer + storage/xml-api/cmdline-sample + storage/xml-api/serviceaccount-appengine-sample + taskqueue/deferred + unittests @@ -40,26 +55,15 @@ org.apache.maven.plugins maven-checkstyle-plugin - 2.15 - - - com.puppycrawl.tools - checkstyle - 6.8.1 - - - - google-checks.xml - true - true - true - + 2.17 + + google-checks.xml + true + true + true + - - - check - - + check diff --git a/storage/json-api/pom.xml b/storage/json-api/pom.xml index 7feeca06b11..704788cf97d 100644 --- a/storage/json-api/pom.xml +++ b/storage/json-api/pom.xml @@ -29,6 +29,20 @@ StorageSample + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + ${project.artifactId}-${project.version} diff --git a/storage/json-api/src/main/java/StorageSample.java b/storage/json-api/src/main/java/StorageSample.java index 196bd9aecbc..a09f65aea69 100644 --- a/storage/json-api/src/main/java/StorageSample.java +++ b/storage/json-api/src/main/java/StorageSample.java @@ -27,7 +27,6 @@ import com.google.api.services.storage.model.StorageObject; import java.io.ByteArrayInputStream; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.security.GeneralSecurityException; diff --git a/storage/storage-transfer/pom.xml b/storage/storage-transfer/pom.xml index 9e3b119d7d0..cc01eb9f346 100644 --- a/storage/storage-transfer/pom.xml +++ b/storage/storage-transfer/pom.xml @@ -70,6 +70,20 @@ 1.7 + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/storage/xml-api/cmdline-sample/pom.xml b/storage/xml-api/cmdline-sample/pom.xml index e8d52b3237d..1b908eb46d9 100644 --- a/storage/xml-api/cmdline-sample/pom.xml +++ b/storage/xml-api/cmdline-sample/pom.xml @@ -16,6 +16,20 @@ Example for the Google Cloud Storage XML API using Application Default Credentials. + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../../google-checks.xml + true + true + true + + + check + + org.codehaus.mojo exec-maven-plugin diff --git a/storage/xml-api/serviceaccount-appengine-sample/pom.xml b/storage/xml-api/serviceaccount-appengine-sample/pom.xml index fd166e17b71..59f6cf2de0a 100644 --- a/storage/xml-api/serviceaccount-appengine-sample/pom.xml +++ b/storage/xml-api/serviceaccount-appengine-sample/pom.xml @@ -92,6 +92,20 @@ gae:deploy + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../../google-checks.xml + true + true + true + + + check + + diff --git a/taskqueue/deferred/pom.xml b/taskqueue/deferred/pom.xml index 30733593c99..cba8ea154d1 100644 --- a/taskqueue/deferred/pom.xml +++ b/taskqueue/deferred/pom.xml @@ -116,6 +116,20 @@ + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../../google-checks.xml + true + true + true + + + check + + diff --git a/unittests/pom.xml b/unittests/pom.xml index 6a4e91ff927..caabbe1516a 100644 --- a/unittests/pom.xml +++ b/unittests/pom.xml @@ -100,6 +100,20 @@ appengine-maven-plugin ${appengine.target.version} + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.17 + + ../google-checks.xml + true + true + true + + + check + +