Description
I'm assuming the org.jetbrains:annotations
dependency is part of testcontainers because it improves Kotlin interoperability.
I've discovered a rather annoying Eclipse IDE feature, where type annotations are always produced in generated code when using the IDE "quick fix" feature:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=565463
This is hardly ever useful or idiomatic in Java code. A workaround is to make the dependency optional:
https://stackoverflow.com/a/63131683/521799
I'm making this dependency optional in jOOQ 3.14 (jOOQ/jOOQ#6244), however, if someone depends on both jOOQ and testcontainers, the testcontainers transitive org.jetbrains:annotations
dependency gets pulled in again, and the Eclipse IDE feature is active again.
A workaround would be to do:
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<exclusions>
<exclusion>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
But I think the dependency could probably be made optional in testcontainers as well...?