From 1e1f9be6396e22e5488990de840d9900e3071480 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Thu, 10 Nov 2016 11:30:18 -0800 Subject: [PATCH] Move checkstyle configs to its own resources package. The checkstyle config can read from the resources of a package. It can't read from the resources of the package it is included in, though (plus you can't use a jar as a parent, anyway). See: http://stackoverflow.com/a/19690484/101923 --- .travis.yml | 1 + checkstyle-config/pom.xml | 147 ++++++++++++++++++ .../src/main/resources/google-checks.xml | 0 .../src/main/resources/suppressions.xml | 0 pom.xml | 9 ++ 5 files changed, 157 insertions(+) create mode 100644 checkstyle-config/pom.xml rename google-checks.xml => checkstyle-config/src/main/resources/google-checks.xml (100%) rename suppressions.xml => checkstyle-config/src/main/resources/suppressions.xml (100%) diff --git a/.travis.yml b/.travis.yml index 7d92e8b7..2dd861bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ language: java jdk: - oraclejdk7 - oraclejdk8 +install: cd checkstyle-config && mvn clean install && cd .. script: mvn clean verify && cd test && mvn clean verify after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/checkstyle-config/pom.xml b/checkstyle-config/pom.xml new file mode 100644 index 00000000..1fcadbb3 --- /dev/null +++ b/checkstyle-config/pom.xml @@ -0,0 +1,147 @@ + + + 4.0.0 + + com.google.cloud.samples + checkstyle-configuration + 1.0.0-SNAPSHOT + jar + + ${project.groupId}:${project.artifactId} + A common checkstyle configuration for Google Cloud samples. + https://github.com/GoogleCloudPlatform/java-repo-tools + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + + Les Vogel + lesv@google.com + Google Inc. + https://cloud.google.com + + + Tim Swast + swast@google.com + Google Inc. + https://cloud.google.com + + + + + https://github.com/GoogleCloudPlatform/java-repo-tools + scm:git:https://github.com/GoogleCloudPlatform/java-repo-tools.git + scm:git:ssh://git@github.com/GoogleCloudPlatform/java-repo-tools.git + v1.0.0 + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + UTF-8 + UTF-8 + + + + 3.1.0 + + + + + + release + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://oss.sonatype.org/ + true + 2145015f0f5c04 + + + + org.apache.maven.plugins + maven-release-plugin + 2.5.3 + + scm:git:ssh://git@github.com/GoogleCloudPlatform/java-repo-tools.git + v@{project.version} + false + release + deploy + + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + false + + + org.apache.maven.plugins + maven-release-plugin + false + + + + + diff --git a/google-checks.xml b/checkstyle-config/src/main/resources/google-checks.xml similarity index 100% rename from google-checks.xml rename to checkstyle-config/src/main/resources/google-checks.xml diff --git a/suppressions.xml b/checkstyle-config/src/main/resources/suppressions.xml similarity index 100% rename from suppressions.xml rename to checkstyle-config/src/main/resources/suppressions.xml diff --git a/pom.xml b/pom.xml index f196abfc..a50a79e5 100644 --- a/pom.xml +++ b/pom.xml @@ -167,6 +167,15 @@ limitations under the License. true suppressions.xml + + + + com.google.cloud.samples + checkstyle-configuration + 1.0.0-SNAPSHOT + + check