You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Matt Massie (Updated) (JIRA)" <ji...@apache.org> on 2011/10/23 00:04:32 UTC
[jira] [Updated] (AVRO-941) Avro should support the Apache Maven
Shade plugin class relocation feature
[ https://issues.apache.org/jira/browse/AVRO-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Massie updated AVRO-941:
-----------------------------
Attachment: shade.patch
Doug's patch against 1.5.4.
> Avro should support the Apache Maven Shade plugin class relocation feature
> --------------------------------------------------------------------------
>
> Key: AVRO-941
> URL: https://issues.apache.org/jira/browse/AVRO-941
> Project: Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.5.4
> Reporter: Matt Massie
> Attachments: shade.patch
>
>
> The Apache shade plugin allows maven builds to create an uber jar that contains dependencies in the project. In addition, the shade plugin allows you to relocate dependencies into a private namespace to prevent class conflicts on shared class paths. Avro does not support relocation.
> All generated Avro objects contain a string field named SCHEMA$ which serves as the authority for the class namespace. When the shade plugin updates the byte code to relocate the class, it doesn't alter the SCHEMA$ string. This break Avro use of reflection since the namespace in SCHEMA$ points to an incorrect location.
> I spoke with Doug about the issue and he was kind enough to provide a quick hack in order to fix this issue. The hack is to check for mismatches between the byte code and the SCHEMA$ and, when they don't match, to defer to the byte code. I'll attach Doug's patch to this Jira.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira