Skip to content

Commit

Permalink
nio: narrower shading (#3568)
Browse files Browse the repository at this point in the history
* narrower shading

* use include for a shorter pom.xml

* remove _stuff prefix from shadedPattern

* update google-cloud-nio-examples README. It works.
  • Loading branch information
jean-philippe-martin authored and pongad committed Aug 20, 2018
1 parent 85645a6 commit 6ee36c4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
14 changes: 14 additions & 0 deletions google-cloud-clients/google-cloud-contrib/google-cloud-nio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
<relocation>
<pattern>com</pattern>
<shadedPattern>shaded.cloud_nio.com</shadedPattern>
<includes>
<include>com.google.**</include>
<include>com.fasterxml.**</include>
</includes>
<excludes>
<exclude>com.google.cloud.**</exclude>
<exclude>com.google.auto.**</exclude>
Expand All @@ -107,10 +111,20 @@
<relocation>
<pattern>org</pattern>
<shadedPattern>shaded.cloud_nio.org</shadedPattern>
<includes>
<include>org.joda.**</include>
<include>org.apache.**</include>
<include>org.threeten.**</include>
<include>org.codehaus.**</include>
</includes>
</relocation>
<relocation>
<pattern>io</pattern>
<shadedPattern>shaded.cloud_nio.io</shadedPattern>
<includes>
<include>io.opencensus.**</include>
<include>io.grpc.**</include>
</includes>
</relocation>
<relocation>
<pattern>okio</pattern>
Expand Down

0 comments on commit 6ee36c4

Please sign in to comment.