On Tue, Feb 16, 2016 at 10:26 AM, Ewen Cheslack-Postava
<
ew...@confluent.io> wrote:
> The dependency is marked as provided.
Ah, I see. You and Mark are really schooling me on Maven here, I appreciate it!
> This is intentional for 2 reasons.
>
> First, one jar provides both old and new (de)serializers. The old ones
> depend on the core jar because everything used to be bundled into a single
> jar. The new ones only require kafka-clients. If you're using the new
> clients (which we encourage), it's helpful not to have to pull in all the
> core dependencies (including scala!) since they won't be referenced anyway.
Ah, I see! That makes sense.
However, I’m not sure you’ve fully achieved your goal of enabling projects using
the new consumer and producer to omit kafka “core” and Scala, etc from their
dependency tree, because AbstractKafkaAvroDeserializer references
kafka.utils.VerifiableProperties which is in “core”. So it seems like maybe that
dependency might have snuck in by accident and compromised that goal.
(That is, unless I’m missing something, which is frequently the case.)
> Second, since you need to use classes from the clients/core jar anyway, your
> project can just provide the dependency explicitly. With a scala dependency
> this is a good idea anyway because if you're using Scala in your own
> project, you may need to specify the right version. Additionally, since we
> maintain compatibility between versions of the serializer APIs but the
> broker/clients may need specific versions, it's good practice to explicitly
> specify the version of Kafka clients you want to use in your own project
> instead of implicitly choosing whichever version we happen to build the
> serializers against.
Makes sense, I agree 100%.
Thank you!
Avi