I am not a maven pro and I got stuck trying to package a Kafka Connector. There are two options for packaging it:
- Either you produce a folder with a jar that contains the connector + all the dependency jars - all the kafka-specific jars
- Or build a fat jar with all of the dependencies (and I also assume without the kafka-specific jars again, but it is not explicit in the docs).
What I tried, after cloning the repo with git, is the following
mvn clean package. But this seems to create only a single jar of the original project with the dependencies in
mvn cache (
Google also has link on how to create a fat
jar, but I would need somehow to specify which jars I want to exclude from the fat jar.
Now I am running:
connect-standalone /etc/kafka/connect-standalone.properties /etc/kafka/connect-cdc-mssql-source.properties
/etc/kafka/connect-standalone.properties contains the following line:
ls -al /shared_win_files contains the following:
jar tvf kafka-connect-cdc-mssql-0.0.1-SNAPSHOT.jar contains the following:
6996 Thu Sep 07 14:47:24 BST 2017 com/github/jcustenborder/kafka/connect/cdc/mssql/MsSqlSourceConnector.class
MsSqlSourceConnector.classis basically this class here which implements the
But when I try to run the connector with the command above, I get an error
Failed to find any class that implements Connector and which name matches com.github.jcustenborder.kafka.connect.cdc.mssql.MsSqlSourceConnector
It gives a massive list with all available plugins, but mine is not in there.