diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 000000000..8e909db98 --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# 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 -eo pipefail + +cd github/google-http-java-client/ + +# Print out Java +java -version +echo $JOB_TYPE + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" + +mvn install -DskipTests=true -B -V +mvn -B dependency:analyze -DfailOnWarning=true diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg new file mode 100644 index 000000000..b89a20740 --- /dev/null +++ b/.kokoro/presubmit/dependencies.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/dependencies.sh" +} diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index c31000af4..15fdb2fc6 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -18,7 +18,6 @@ https://download.oracle.com/javase/7/docs/api/ - https://jar-download.com/artifacts/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version}/documentation ${project.name} ${project.version} ${project.artifactId} ${project.version} @@ -87,24 +86,18 @@ com.google.http-client google-http-client - - com.google.http-client - google-http-client-test - test - junit junit test - com.google.guava - guava - test + org.apache.httpcomponents + httpclient org.apache.httpcomponents - httpclient + httpcore org.mockito diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 42dccf641..1c7f89d6a 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -48,6 +48,14 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + com.google.appengine:appengine-api-stubs + + @@ -80,10 +88,5 @@ junit test - - com.google.guava - guava - test - diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 5fab3c601..b6ed96eec 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -32,13 +32,17 @@ true + + org.apache.maven.plugins + maven-dependency-plugin + + + com.google.http-client:google-http-client + + - - com.google.http-client - google-http-client - com.google.code.findbugs findbugs @@ -58,5 +62,14 @@ + + com.google.code.findbugs + bcel-findbugs + 6.0 + + + com.google.http-client + google-http-client + diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 871da6b75..d93727a7d 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -67,11 +67,6 @@ google-http-client-test test - - junit - junit - test - com.google.code.gson gson diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 2f3af9abb..99ce3e5e3 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -67,11 +67,6 @@ google-http-client-test test - - junit - junit - test - com.fasterxml.jackson.core jackson-core diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 1615ee91f..0365b7bb9 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -72,6 +72,10 @@ org.apache.httpcomponents httpclient + + org.apache.httpcomponents + httpcore + com.google.code.findbugs jsr305 diff --git a/pom.xml b/pom.xml index a2b5784d0..edf2ef59a 100644 --- a/pom.xml +++ b/pom.xml @@ -147,6 +147,11 @@ httpclient ${project.httpclient.version} + + org.apache.httpcomponents + httpcore + ${project.httpcore.version} + com.google.guava guava @@ -357,6 +362,11 @@ maven-site-plugin 3.7.1 + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.1 + @@ -552,6 +562,7 @@ 1.1.4c 1.2 4.5.9 + 4.4.11 0.21.0 .. false