Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider making the org.jetbrains:annotations dependency optional #3057

Closed
lukaseder opened this issue Jul 28, 2020 · 2 comments
Closed

Consider making the org.jetbrains:annotations dependency optional #3057

lukaseder opened this issue Jul 28, 2020 · 2 comments

Comments

@lukaseder
Copy link
Contributor

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...?

@bsideup
Copy link
Member

bsideup commented Jul 30, 2020

@lukaseder thanks for reporting! We should definitely remove it as compile dependency and it is a long overdue, actually.

wpanas added a commit to wpanas/testcontainers-java that referenced this issue Aug 26, 2020
wpanas added a commit to wpanas/testcontainers-java that referenced this issue Aug 26, 2020
wpanas added a commit to wpanas/testcontainers-java that referenced this issue Aug 26, 2020
wpanas added a commit to wpanas/testcontainers-java that referenced this issue Aug 26, 2020
wpanas added a commit to wpanas/testcontainers-java that referenced this issue Aug 26, 2020
wpanas added a commit to wpanas/testcontainers-java that referenced this issue Aug 26, 2020
rnorth pushed a commit that referenced this issue Sep 1, 2020
@rnorth
Copy link
Member

rnorth commented Sep 1, 2020

Fixed in #3157

@rnorth rnorth closed this as completed Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants