Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro, mail # user - Configuring avro-maven-plugin to generate java classes with non-default field properties


Copy link to this message
-
Configuring avro-maven-plugin to generate java classes with non-default field properties
Pankaj Shroff 2013-03-14, 06:53
Hi

In the OpenRTB reference implementation, I use the avro-maven-plugin
exclusively to generate java classes from .avpr protocol definition files.
Since release 1.6.1 of Avro (I believe), the avro SpecificCompiler defaults
to marking the fields of generated classes to be PUBLIC_DEPRECATED
(@Deprecated directive and public scope) by default. Reading the archives
and the patch that changed this behavior since 1.5.x, I know that one can
use SpecificCompiler in java code and call setFieldProperties to change the
default behavior. But is there also any way to change this using the
apache-maven-plugin ?

I was hoping for examples of pom.xml that show how to add <configuration>
parameters to the avro-maven-plugin so that generated java sources have
field properties PUBLIC or PRIVATE and not PUBLIC_DEPRECATED (default).

Thanks in advance.

--
Pankaj Shroff
[EMAIL PROTECTED]
+
Doug Cutting 2013-03-14, 22:11
+
Pankaj Shroff 2013-03-15, 09:06
+
Pankaj Shroff 2013-03-15, 16:19