Skip to content

Commit 6ee36c4

Browse files
jean-philippe-martinpongad
authored andcommitted
nio: narrower shading (googleapis#3568)
* narrower shading * use include for a shorter pom.xml * remove _stuff prefix from shadedPattern * update google-cloud-nio-examples README. It works.
1 parent 85645a6 commit 6ee36c4

File tree

2 files changed

+16
-2
lines changed
  • google-cloud-clients/google-cloud-contrib

2 files changed

+16
-2
lines changed

google-cloud-clients/google-cloud-contrib/google-cloud-nio-examples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ To run this example:
2323
2424
[//]: # ({x-version-update-start:google-cloud-nio:current})
2525
```
26-
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
26+
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
2727
```
2828
2929
Notice that it lists Google Cloud Storage, which it wouldn't if you ran it without the NIO jar:
3030
```
31-
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
31+
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
3232
```
3333
[//]: # ({x-version-update-end})
3434

google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@
9999
<relocation>
100100
<pattern>com</pattern>
101101
<shadedPattern>shaded.cloud_nio.com</shadedPattern>
102+
<includes>
103+
<include>com.google.**</include>
104+
<include>com.fasterxml.**</include>
105+
</includes>
102106
<excludes>
103107
<exclude>com.google.cloud.**</exclude>
104108
<exclude>com.google.auto.**</exclude>
@@ -107,10 +111,20 @@
107111
<relocation>
108112
<pattern>org</pattern>
109113
<shadedPattern>shaded.cloud_nio.org</shadedPattern>
114+
<includes>
115+
<include>org.joda.**</include>
116+
<include>org.apache.**</include>
117+
<include>org.threeten.**</include>
118+
<include>org.codehaus.**</include>
119+
</includes>
110120
</relocation>
111121
<relocation>
112122
<pattern>io</pattern>
113123
<shadedPattern>shaded.cloud_nio.io</shadedPattern>
124+
<includes>
125+
<include>io.opencensus.**</include>
126+
<include>io.grpc.**</include>
127+
</includes>
114128
</relocation>
115129
<relocation>
116130
<pattern>okio</pattern>

0 commit comments

Comments
 (0)