From d12e5f27532792a94cfa9aeeadbb8d833371135d Mon Sep 17 00:00:00 2001 From: makearl Date: Thu, 29 Mar 2018 12:15:23 -0400 Subject: [PATCH] Bump version, make `legacy_name` use the short name instead of full --- README.md | 3 ++- pom.xml | 22 +++++++++++++++++-- .../connect/protobuf/ProtobufData.java | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9f58f48..bf4d10f 100644 --- a/README.md +++ b/README.md @@ -152,5 +152,6 @@ Create the JAR: mvn clean package ``` -Copy the JAR to `/usr/share/java/kafka-serde-tools` on your local Kafka Connect instance to make the +Copy the JAR with dependencies (`kafka-connect-protobuf-converter-*-jar-with-dependencies.jar`) to +`/usr/share/java/kafka-serde-tools` on your local Kafka Connect instance to make the converter available in Kafka Connect. diff --git a/pom.xml b/pom.xml index 6e20e89..7af2261 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ com.blueapron kafka-connect-protobuf-converter jar - 1.3.0 + 2.0.0 3.4.0 @@ -18,7 +18,7 @@ org.apache.kafka connect-api - 0.10.2.1 + 1.0.0 com.google.protobuf @@ -61,6 +61,24 @@ 1.8 + + maven-assembly-plugin + 3.1.0 + + + jar-with-dependencies + + + + + make-assembly + package + + single + + + + diff --git a/src/main/java/com/blueapron/connect/protobuf/ProtobufData.java b/src/main/java/com/blueapron/connect/protobuf/ProtobufData.java index 9137734..7312ad1 100644 --- a/src/main/java/com/blueapron/connect/protobuf/ProtobufData.java +++ b/src/main/java/com/blueapron/connect/protobuf/ProtobufData.java @@ -68,7 +68,7 @@ private String getProtoMapKey(String descriptorContainingTypeName, String connec private String getConnectFieldName(Descriptors.FieldDescriptor descriptor) { String name = descriptor.getName(); for (Map.Entry option: descriptor.getOptions().getAllFields().entrySet()) { - if (option.getKey().getFullName().equalsIgnoreCase(this.legacyName)) { + if (option.getKey().getName().equalsIgnoreCase(this.legacyName)) { name = option.getValue().toString(); } }