Hello,
in the Pulsar project we use a shaded version of Avro, that is, we
package Avro in a uber Java for the Pulsar client by renaming all the
classes from org.apache.avro to
org.apache.pulsar.shaded.org.apache.avro.

For this reason users of the Pulsar client cannot generate the Avro
classes using the Maven plugin because the generated classes expect
Avro classes with the canonical package name.

For the sake of completeness: you could use a version of the Pulsar
client without the shaded version of Avro , but that's not always the
case because in that case the Pulsar client does not shade all of the
other third party dependencies and it often clashes with other third
party libraries.

My question is:
Is it possible to tell the Maven plugin to use a different package
name for Avro ?

My understanding is that we are using a fixed Velocity template
https://github.com/apache/avro/blob/44737386cb17a359515f068e7fe9caa0f7bfff70/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm#L22

I would be happy to contribute a patch following your guide if there
is no way to achieve that without code changes.

Best regards
Enrico Olivelli

Reply via email to