This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 266834e unshade avro in pulsar-client-schema (#2197)
266834e is described below
commit 266834ef2bde5ed2965964f818a369200857acf1
Author: Boyang Jerry Peng <[email protected]>
AuthorDate: Thu Jul 19 00:30:08 2018 -0700
unshade avro in pulsar-client-schema (#2197)
### Motivation
If users want to use Avro annotations with their POJOs, currently they
would have to use the our shaded version of avro because we shade avro which is
not the best user experience. Ideally they should just use the original avro
annotations
For example users want to something like this:
@org.apache.avro.reflect.AvroSchema(“{ \“type\“: \“long\“, \“logicalType\“:
\“timestamp-millis\” }“)
private long date;
but since we shade avro the user would need to specify like this:
@org.apache.pulsar.shade.org.apache.avro.reflect.AvroSchema(“{ \“type\“:
\“long\“, \“logicalType\“: \“timestamp-millis\” }“)
private long date;
### Modifications
Unshade avro in pulsar-client-schema
---
pulsar-client-schema/pom.xml | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/pulsar-client-schema/pom.xml b/pulsar-client-schema/pom.xml
index a7d9f47..7ee5646 100644
--- a/pulsar-client-schema/pom.xml
+++ b/pulsar-client-schema/pom.xml
@@ -285,8 +285,20 @@
<relocation>
<pattern>org.apache.avro</pattern>
<shadedPattern>org.apache.pulsar.shade.org.apache.avro</shadedPattern>
- </relocation>
- <!-- Avro transitive dependencies-->
+ <excludes>
+
<exclude>org.apache.avro.reflect.AvroAlias</exclude>
+
<exclude>org.apache.avro.reflect.AvroDefault</exclude>
+
<exclude>org.apache.avro.reflect.AvroEncode</exclude>
+
<exclude>org.apache.avro.reflect.AvroIgnore</exclude>
+
<exclude>org.apache.avro.reflect.AvroMeta</exclude>
+
<exclude>org.apache.avro.reflect.AvroName</exclude>
+
<exclude>org.apache.avro.reflect.AvroSchema</exclude>
+
<exclude>org.apache.avro.reflect.Nullable</exclude>
+
<exclude>org.apache.avro.reflect.Stringable</exclude>
+
<exclude>org.apache.avro.reflect.Union</exclude>
+ </excludes>
+ </relocation>
+ <!--Avro transitive dependencies-->
<relocation>
<pattern>org.codehaus.jackson</pattern>
<shadedPattern>org.apache.pulsar.shade.org.codehaus.jackson</shadedPattern>