From 50bc8f087ed7e0a5cf9ef7bff17e5d30c3808144 Mon Sep 17 00:00:00 2001 From: Chanseok Oh Date: Thu, 22 Aug 2019 14:31:56 -0400 Subject: [PATCH] Force downgrading to org.apache.httpcomponents:httpclient:4.5.6 prevent URI normalization (#1924) * Force org.apache.httpcomponents:httpclient:4.5.6 * Update CHANGELOGs --- jib-core/CHANGELOG.md | 2 ++ jib-core/build.gradle | 18 +++++++++++++++--- jib-gradle-plugin/CHANGELOG.md | 2 ++ jib-gradle-plugin/build.gradle | 13 ++++++++++--- jib-maven-plugin/CHANGELOG.md | 2 ++ jib-maven-plugin/pom.xml | 6 ++++++ jib-plugins-common/build.gradle | 13 ++++++++++--- 7 files changed, 47 insertions(+), 9 deletions(-) diff --git a/jib-core/CHANGELOG.md b/jib-core/CHANGELOG.md index cbdc27c657..97984a9e4f 100644 --- a/jib-core/CHANGELOG.md +++ b/jib-core/CHANGELOG.md @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. ### Fixed +- Fixed an issue interacting with certain registries due to changes to URL handling in the underlying Apache HttpClient library. ([#1924](https://github.com/GoogleContainerTools/jib/issues/1924)) + ## 0.10.1 ### Added diff --git a/jib-core/build.gradle b/jib-core/build.gradle index bf1bf7585a..ff02b8c97c 100644 --- a/jib-core/build.gradle +++ b/jib-core/build.gradle @@ -41,9 +41,21 @@ dependencies { // For Google libraries, check , , , // ... in https://github.com/googleapis/google-cloud-java/blob/master/google-cloud-clients/pom.xml // for best compatibility. - implementation 'com.google.http-client:google-http-client:1.31.0' - implementation 'com.google.http-client:google-http-client-apache-v2:1.31.0' - implementation 'com.google.auth:google-auth-library-oauth2-http:0.16.2' + // + // TODO: remove once https://github.com/googleapis/google-http-java-client/issues/795 is fixed and released. + // Forcing to downgrade this to 4.5.6 fixes https://github.com/GoogleContainerTools/jib/issues/1914 + // However, #795 and upgrading httpclient alone may not fix #1914. We may need to explicitly disable URI + // normalization as discussed in #795. + implementation('com.google.http-client:google-http-client:1.31.0') { + exclude group: "org.apache.httpcomponents", module: "httpclient" + } + implementation('com.google.http-client:google-http-client-apache-v2:1.31.0') { + exclude group: "org.apache.httpcomponents", module: "httpclient" + } + implementation('com.google.auth:google-auth-library-oauth2-http:0.16.2') { + exclude group: "org.apache.httpcomponents", module: "httpclient" + } + implementation 'org.apache.httpcomponents:httpclient:4.5.6' implementation 'com.google.guava:guava:28.0-jre' implementation 'org.apache.commons:commons-compress:1.18' diff --git a/jib-gradle-plugin/CHANGELOG.md b/jib-gradle-plugin/CHANGELOG.md index 7500fa1b27..dbc013a8d7 100644 --- a/jib-gradle-plugin/CHANGELOG.md +++ b/jib-gradle-plugin/CHANGELOG.md @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. ### Fixed +- Fixed an issue interacting with certain registries due to changes to URL handling in the underlying Apache HttpClient library. ([#1924](https://github.com/GoogleContainerTools/jib/issues/1924)) + ## 1.5.0 ### Added diff --git a/jib-gradle-plugin/build.gradle b/jib-gradle-plugin/build.gradle index 997d6073f9..4513a2c180 100644 --- a/jib-gradle-plugin/build.gradle +++ b/jib-gradle-plugin/build.gradle @@ -61,9 +61,16 @@ configurations { dependencies { // These are copied over from jib-core and are necessary for the jib-core sourcesets. - compile 'com.google.http-client:google-http-client:1.31.0' - compile 'com.google.http-client:google-http-client-apache-v2:1.31.0' - compile 'com.google.auth:google-auth-library-oauth2-http:0.16.2' + compile('com.google.http-client:google-http-client:1.31.0') { + exclude group: "org.apache.httpcomponents", module: "httpclient" + } + compile('com.google.http-client:google-http-client-apache-v2:1.31.0') { + exclude group: "org.apache.httpcomponents", module: "httpclient" + } + compile('com.google.auth:google-auth-library-oauth2-http:0.16.2') { + exclude group: "org.apache.httpcomponents", module: "httpclient" + } + compile 'org.apache.httpcomponents:httpclient:4.5.6' compile 'com.google.guava:guava:28.0-jre' compile 'org.apache.commons:commons-compress:1.18' diff --git a/jib-maven-plugin/CHANGELOG.md b/jib-maven-plugin/CHANGELOG.md index 3285553815..f64fe90573 100644 --- a/jib-maven-plugin/CHANGELOG.md +++ b/jib-maven-plugin/CHANGELOG.md @@ -9,6 +9,8 @@ All notable changes to this project will be documented in this file. ### Fixed +- Fixed an issue interacting with certain registries due to changes to URL handling in the underlying Apache HttpClient library. ([#1924](https://github.com/GoogleContainerTools/jib/issues/1924)) + ## 1.5.0 ### Added diff --git a/jib-maven-plugin/pom.xml b/jib-maven-plugin/pom.xml index f50fe24b4a..6a433ace4b 100644 --- a/jib-maven-plugin/pom.xml +++ b/jib-maven-plugin/pom.xml @@ -62,6 +62,12 @@ 1.31.0 compile + + org.apache.httpcomponents + httpclient + 4.5.6 + compile + com.google.auth google-auth-library-oauth2-http diff --git a/jib-plugins-common/build.gradle b/jib-plugins-common/build.gradle index 81ea47811f..8ee67d0889 100644 --- a/jib-plugins-common/build.gradle +++ b/jib-plugins-common/build.gradle @@ -29,9 +29,16 @@ sourceSets { dependencies { // Make sure these are consistent with jib-maven-plugin. - compile 'com.google.http-client:google-http-client:1.31.0' - compile 'com.google.http-client:google-http-client-apache-v2:1.31.0' - compile 'com.google.auth:google-auth-library-oauth2-http:0.16.2' + compile('com.google.http-client:google-http-client:1.31.0') { + exclude group: "org.apache.httpcomponents", module: "httpclient" + } + compile('com.google.http-client:google-http-client-apache-v2:1.31.0') { + exclude group: "org.apache.httpcomponents", module: "httpclient" + } + compile('com.google.auth:google-auth-library-oauth2-http:0.16.2') { + exclude group: "org.apache.httpcomponents", module: "httpclient" + } + compile 'org.apache.httpcomponents:httpclient:4.5.6' compile 'com.google.guava:guava:28.0-jre' compile 'org.apache.commons:commons-compress:1.18'