diff --git a/pom.xml b/pom.xml index 4bb9981..2fa2303 100644 --- a/pom.xml +++ b/pom.xml @@ -1,87 +1,129 @@ - - 4.0.0 - - com.fasterxml.jackson - jackson-parent - 2.7 - - com.fasterxml.jackson.dataformat - jackson-dataformat-avro - Jackson-dataformat-Avro - 2.7.2-SNAPSHOT - bundle - Support for reading and writing AVRO-encoded data via Jackson + + 4.0.0 + + com.fasterxml.jackson + jackson-parent + 2.7 + + com.fasterxml.jackson.dataformat + jackson-dataformat-avro + Jackson-dataformat-Avro + 2.7.2-SNAPSHOT + bundle + Support for reading and writing AVRO-encoded data via Jackson abstractions. - http://wiki.fasterxml.com/JacksonExtensionAVRO - - scm:git:git@github.com:FasterXML/jackson-dataformat-avro.git - scm:git:git@github.com:FasterXML/jackson-dataformat-avro.git - http://github.com/FasterXML/jackson-dataformat-avro - HEAD - + http://wiki.fasterxml.com/JacksonExtensionAVRO + + scm:git:git@github.com:FasterXML/jackson-dataformat-avro.git + scm:git:git@github.com:FasterXML/jackson-dataformat-avro.git + http://github.com/FasterXML/jackson-dataformat-avro + HEAD + - - 2.7.1 + + 2.7.1 - - com/fasterxml/jackson/dataformat/avro - ${project.groupId}.avro - + + com/fasterxml/jackson/dataformat/avro + ${project.groupId}.avro + - - - - com.fasterxml.jackson.core - jackson-core - ${version.jackson.core} - - - - com.fasterxml.jackson.core - jackson-databind - ${version.jackson.core} - - - org.apache.avro - avro - 1.7.7 - + + + + com.fasterxml.jackson.core + jackson-core + ${version.jackson.core} + + + + com.fasterxml.jackson.core + jackson-databind + ${version.jackson.core} + + + org.apache.avro + avro + 1.7.7 + - - - com.fasterxml.jackson.core - jackson-annotations - test - - + + + com.fasterxml.jackson.core + jackson-annotations + test + + - - - - org.apache.maven.plugins - - ${version.plugin.surefire} - maven-surefire-plugin - - - com/fasterxml/jackson/dataformat/avro/failing/*.java - - - - - com.google.code.maven-replacer-plugin - replacer - - - process-packageVersion - generate-sources - - - - - + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-sources + generate-sources + + add-source + + + + target/generated-sources + + + + + + + org.apache.avro + avro-maven-plugin + 1.7.4 + + + schemas + generate-sources + + schema + protocol + idl-protocol + + + + **/mapred/tether/** + + src/test/resources/com/fasterxml/jackson/dataformat/avro + target/generated-sources + private + String + + + + + + org.apache.maven.plugins + + ${version.plugin.surefire} + maven-surefire-plugin + + + com/fasterxml/jackson/dataformat/avro/failing/*.java + + + + + com.google.code.maven-replacer-plugin + replacer + + + process-packageVersion + generate-sources + + + + + diff --git a/src/test/java/com/fasterxml/jackson/dataformat/avro/Issue35Test.java b/src/test/java/com/fasterxml/jackson/dataformat/avro/Issue35Test.java new file mode 100644 index 0000000..b02f84d --- /dev/null +++ b/src/test/java/com/fasterxml/jackson/dataformat/avro/Issue35Test.java @@ -0,0 +1,19 @@ +package com.fasterxml.jackson.dataformat.avro; + +import com.demonstration.Event; +import com.demonstration.EventID; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class Issue35Test extends AvroTestBase { + + public void testWriteBidResponse() throws JsonProcessingException { + Event event = new Event(); + event.setPlayerCount(100); + EventID id = new EventID(); + id.setFirst(10); + ObjectMapper mapper = new ObjectMapper(new AvroFactory()); + byte[] bytes = mapper.writer(new AvroSchema(Event.SCHEMA$)).writeValueAsBytes(event); + assertNotNull(bytes); + } +}