[
https://issues.apache.org/jira/browse/AVRO-1762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16860251#comment-16860251
]
Hudson commented on AVRO-1762:
------------------------------
SUCCESS: Integrated in Jenkins build AvroJava #674 (See
[https://builds.apache.org/job/AvroJava/674/])
AVRO-1762: Velocity custom objects (#524) (fokko:
[https://github.com/apache/avro/commit/a897c50bf28720373b89b10661902a8b9754f7a5])
* (edit)
lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/IDLProtocolMojo.java
* (add) lang/java/maven-plugin/src/test/resources/templates/enum.vm
* (add)
lang/java/maven-plugin/src/test/resources/unit/protocol/pom-injecting-velocity-tools.xml
* (edit)
lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/AbstractAvroMojo.java
* (add) lang/java/maven-plugin/src/test/resources/templates/protocol.vm
* (add)
lang/java/compiler/src/test/resources/templates_with_custom_tools/record.vm
* (edit)
lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/SchemaMojo.java
* (edit)
lang/java/compiler/src/test/java/org/apache/avro/compiler/specific/TestSpecificCompiler.java
* (edit)
lang/java/maven-plugin/src/test/java/org/apache/avro/mojo/TestProtocolMojo.java
* (edit)
lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
* (edit)
lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/ProtocolMojo.java
* (edit)
lang/java/maven-plugin/src/test/java/org/apache/avro/mojo/TestSchemaMojo.java
* (add) lang/java/maven-plugin/src/test/resources/templates/record.vm
* (add)
lang/java/maven-plugin/src/test/resources/unit/schema/pom-injecting-velocity-tools.xml
* (edit)
lang/java/maven-plugin/src/test/java/org/apache/avro/mojo/TestIDLProtocolMojo.java
* (add)
lang/java/maven-plugin/src/test/resources/unit/idl/pom-injecting-velocity-tools.xml
> Allow putting additional objects into the Velocity template
> -----------------------------------------------------------
>
> Key: AVRO-1762
> URL: https://issues.apache.org/jira/browse/AVRO-1762
> Project: Apache Avro
> Issue Type: Improvement
> Components: java
> Reporter: Matheus Santana
> Assignee: Nicola Bova
> Priority: Major
> Fix For: 1.10.0, 1.9.1
>
> Attachments: AVRO-1762.patch
>
>
> This JIRA proposes the ability to inject custom POJOs into the Velocity
> template.
> It is possible [to override template directory
> configuration|https://issues.apache.org/jira/browse/AVRO-963?jql=project%20%3D%20AVRO%20AND%20component%20%3D%20java%20AND%20text%20~%20%22template%22]
> and thus make the compiler to generate customized code. However,
> customization possibilities are constrained to [Velocity Template
> Language|https://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocity_template_language_vtl:_an_introduction]
> and [objects
> injected|https://github.com/apache/avro/blob/trunk/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java#L339-L340]
> into the template's context.
> The ability of injecting custom objects into the template's context would
> leverage customization possibilities to the whole Java language itself. The
> patch I'm about to attach modifies both compiler and maven-plugin in order to
> provide client applications with the ability of easy injecting custom Java
> objects into the Velocity templates' context.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)