The collector is probably best thought of as something separate from application instrumentation.
Here's the official docs https://opentelemetry.io/docs/languages/java/intro/#dependencies-and-boms
In short -- depend on the opentelemetry-instrumentation-bom; that'll bring in compatible versions of the otel agent & API.