title: How to use Avro generated schemas with Kafka Connect custom source connector
body: <p>I'm developing a custom source connector using Kafka Connect, and I am trying to incorporate Avro support. For this purpose I created some <code>.avsc</code> files to describe my key and value schemas and added the <code>avro-maven-plugin</code> to my project to automatically create corresponding java classes that I can use in my code.</p>
  
  <p>From the generated classes, I can get the schema as an object of type <code>org.apache.avro.Schema</code>.</p>
  
  <p>But the return type of the <code>poll</code> method of the source connector is a list of <code>org.apache.kafka.connect.source.SourceRecord</code> objects, whose constructor takes schemas as instances of <code>org.apache.kafka.connect.data.Schema</code>, and I simply don't see a straight-forward way to convert one to the other.</p>
  
  <p>So how do I get suitable key/value schema instances that I can then plug into the SourceRecords to be returned from the poll method in my connector?</p>
  
  <p>Am I even on the right track with using the Avro Maven plugin, or should I use something else?</p>