From eee96610e03432bd3a2490350403007d58d0ab9b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Martin Date: Thu, 16 Aug 2018 14:53:26 -0700 Subject: [PATCH 1/4] narrower shading --- .../google-cloud-nio/pom.xml | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml index b7c277b2e260..bc5101f2642d 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml @@ -97,20 +97,40 @@ true - com - shaded.cloud_nio.com + com.google + shaded.cloud_nio.com.google com.google.cloud.** com.google.auto.** - org - shaded.cloud_nio.org + com.fasterxml + shaded.cloud_nio.com.fasterxml - io - shaded.cloud_nio.io + org.joda + shaded.cloud_nio.org.joda + + + org.apache + shaded.cloud_nio.org.apache + + + org.threeten + shaded.cloud_nio.org.threeten + + + org.codehaus + shaded.cloud_nio.org.codehaus + + + io.opencensus + shaded.cloud_nio.io.opencensus + + + io.grpc + shaded.cloud_nio.io.grpc okio From 80c660cf428bedec3cc6110eba9ea28ec9d815a2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Martin Date: Thu, 16 Aug 2018 16:54:51 -0700 Subject: [PATCH 2/4] use include for a shorter pom.xml --- .../google-cloud-nio/pom.xml | 46 ++++++++----------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml index bc5101f2642d..003c4fbd1912 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml @@ -97,40 +97,34 @@ true - com.google - shaded.cloud_nio.com.google + com + shaded.cloud_nio.com_stuff + + com.google.** + com.fasterxml.** + com.google.cloud.** com.google.auto.** - com.fasterxml - shaded.cloud_nio.com.fasterxml + org + shaded.cloud_nio.org_stuff + + org.joda.** + org.apache.** + org.threeten.** + org.codehaus.** + - org.joda - shaded.cloud_nio.org.joda - - - org.apache - shaded.cloud_nio.org.apache - - - org.threeten - shaded.cloud_nio.org.threeten - - - org.codehaus - shaded.cloud_nio.org.codehaus - - - io.opencensus - shaded.cloud_nio.io.opencensus - - - io.grpc - shaded.cloud_nio.io.grpc + io + shaded.cloud_nio.io_stuff + + io.opencensus.** + io.grpc.** + okio From 931c9f640236b9af649414012ebc72b305ba4fa1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Martin Date: Fri, 17 Aug 2018 10:03:17 -0700 Subject: [PATCH 3/4] remove _stuff prefix from shadedPattern --- .../google-cloud-contrib/google-cloud-nio/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml index 003c4fbd1912..91ef9031d91a 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml @@ -98,7 +98,7 @@ com - shaded.cloud_nio.com_stuff + shaded.cloud_nio.com com.google.** com.fasterxml.** @@ -110,7 +110,7 @@ org - shaded.cloud_nio.org_stuff + shaded.cloud_nio.org org.joda.** org.apache.** @@ -120,7 +120,7 @@ io - shaded.cloud_nio.io_stuff + shaded.cloud_nio.io io.opencensus.** io.grpc.** From 200699157352e23499db0ee4c9a986dc2f112da1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Martin Date: Fri, 17 Aug 2018 10:23:34 -0700 Subject: [PATCH 4/4] update google-cloud-nio-examples README. It works. --- .../google-cloud-contrib/google-cloud-nio-examples/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/README.md b/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/README.md index 0b5f6fa07af6..5a9ddf999466 100644 --- a/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/README.md +++ b/google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/README.md @@ -23,12 +23,12 @@ To run this example: [//]: # ({x-version-update-start:google-cloud-nio:current}) ``` - java -cp google-cloud-contrib/google-cloud-nio/target/google-cloud-nio-0.58.1-alpha-SNAPSHOT.jar:google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.58.1-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems + java -cp google-cloud-clients/google-cloud-contrib/google-cloud-nio/target/google-cloud-nio-0.58.1-alpha-SNAPSHOT-shaded.jar:google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.58.1-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems ``` Notice that it lists Google Cloud Storage, which it wouldn't if you ran it without the NIO jar: ``` - java -cp google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.58.1-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems + java -cp google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.58.1-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems ``` [//]: # ({x-version-update-end})