Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit cd2fe32

Browse files
authored
Merge pull request #7 from blueapron/update-to-1.0
Upgrade to Kafka 1.0, improve legacy_name usability
2 parents 433be31 + d12e5f2 commit cd2fe32

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,6 @@ Create the JAR:
152152
mvn clean package
153153
```
154154

155-
Copy the JAR to `/usr/share/java/kafka-serde-tools` on your local Kafka Connect instance to make the
155+
Copy the JAR with dependencies (`kafka-connect-protobuf-converter-*-jar-with-dependencies.jar`) to
156+
`/usr/share/java/kafka-serde-tools` on your local Kafka Connect instance to make the
156157
converter available in Kafka Connect.

pom.xml

+20-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>com.blueapron</groupId>
88
<artifactId>kafka-connect-protobuf-converter</artifactId>
99
<packaging>jar</packaging>
10-
<version>1.3.0</version>
10+
<version>2.0.0</version>
1111

1212
<properties>
1313
<protobuf.version>3.4.0</protobuf.version>
@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>org.apache.kafka</groupId>
2020
<artifactId>connect-api</artifactId>
21-
<version>0.10.2.1</version>
21+
<version>1.0.0</version>
2222
</dependency>
2323
<dependency>
2424
<groupId>com.google.protobuf</groupId>
@@ -61,6 +61,24 @@
6161
<target>1.8</target>
6262
</configuration>
6363
</plugin>
64+
<plugin>
65+
<artifactId>maven-assembly-plugin</artifactId>
66+
<version>3.1.0</version>
67+
<configuration>
68+
<descriptorRefs>
69+
<descriptorRef>jar-with-dependencies</descriptorRef>
70+
</descriptorRefs>
71+
</configuration>
72+
<executions>
73+
<execution>
74+
<id>make-assembly</id>
75+
<phase>package</phase>
76+
<goals>
77+
<goal>single</goal>
78+
</goals>
79+
</execution>
80+
</executions>
81+
</plugin>
6482
</plugins>
6583
</build>
6684
</project>

src/main/java/com/blueapron/connect/protobuf/ProtobufData.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private String getProtoMapKey(String descriptorContainingTypeName, String connec
6868
private String getConnectFieldName(Descriptors.FieldDescriptor descriptor) {
6969
String name = descriptor.getName();
7070
for (Map.Entry<Descriptors.FieldDescriptor, Object> option: descriptor.getOptions().getAllFields().entrySet()) {
71-
if (option.getKey().getFullName().equalsIgnoreCase(this.legacyName)) {
71+
if (option.getKey().getName().equalsIgnoreCase(this.legacyName)) {
7272
name = option.getValue().toString();
7373
}
7474
}

0 commit comments

Comments
 (0)