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

Maven version 0.4.1 is missing dependencies #1257

Closed
ShadelessFox opened this issue Feb 27, 2023 · 10 comments · Fixed by #1268
Closed

Maven version 0.4.1 is missing dependencies #1257

ShadelessFox opened this issue Feb 27, 2023 · 10 comments · Fixed by #1268
Labels

Comments

@ShadelessFox
Copy link

ShadelessFox commented Feb 27, 2023

Describe the bug

Using the driver is impossible as simple as just adding a Maven dependency because its pom.xml lacks all dependencies whatsoever:

https://repo1.maven.org/maven2/com/clickhouse/clickhouse-jdbc/0.4.1/clickhouse-jdbc-0.4.1.pom

In contrast, the previous version doesn't have the same issue:

https://repo1.maven.org/maven2/com/clickhouse/clickhouse-jdbc/0.4.0/clickhouse-jdbc-0.4.0.pom

It's also problematic to add the required dependencies manually because they aren't listed anywhere.

Perhaps I'm missing something?

@zhicwu
Copy link
Contributor

zhicwu commented Feb 27, 2023

Thanks for the report @ShadelessFox. This was introduced in #1204 for making all dependencies optional. However, I completely forgot to replace the default jar with a shaded one 😞 This will be fixed in next release.

By the way, why DBeaver does not use shaded jar by specifying classifier?

@ShadelessFox
Copy link
Author

Are you talking about artifact classifiers? Can you elaborate, please?

We can specify a direct link to the jar file, but we'd better wait for the next release.

@zhicwu
Copy link
Contributor

zhicwu commented Feb 28, 2023

Yes, it's better to wait for the next release. RE: artifact classifier, I was talking about something like the following:

<dependency>
    <groupId>com.clickhouse</groupId>
    <artifactId>clickhouse-jdbc</artifactId>
    <version>0.4.1</version>
    <classifier>all</classifier>
</dependency>

@ShadelessFox
Copy link
Author

Ah, I see. Yes, specifying the classifier works, indeed. We can go with it for now.

Can this ticket remain open until the new version is released so we can update our dependencies?

@zhicwu
Copy link
Contributor

zhicwu commented Mar 1, 2023

Thanks but I think you don't have to make the change in DBeaver but wait for the new release.

Sure, let's leave this open until the new version is released.

Update: on a second thought, I think it's better to allow user to select classifier in DBeaver - see dbeaver/dbeaver#19222

@zhicwu
Copy link
Contributor

zhicwu commented Mar 3, 2023

@ShadelessFox, I added a few more dependencies with provided scope, so that they will show up in DBeaver when downloading driver files. I'm not sure how I can test using DBeaver, could you help to validate using nightly build? It should work without adding classifier.

...
<repositories>
    <repository>
        <id>ossrh</id>
        <name>Sonatype OSSRH</name>
        <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
</repositories>
...
<dependency>
    <groupId>com.clickhouse</groupId>
    <artifactId>clickhouse-jdbc</artifactId>
    <version>0.4.2-SNAPSHOT</version>
</dependency>

@ShadelessFox
Copy link
Author

Thank you for providing a nightly version, but we don't want to add a new repository just for that.

We decided to specify the classifier until a new version is released.

@zhicwu
Copy link
Contributor

zhicwu commented Mar 6, 2023

Thank you for providing a nightly version, but we don't want to add a new repository just for that.

No, I was asking if you can validate the change using nightly build at your end as I don't know how :)

@ShadelessFox
Copy link
Author

ShadelessFox commented Mar 7, 2023

So just locally? No, it doesn't work against the provided repository.

DBeaver expects to find file clickhouse-jdbc-0.4.2-SNAPSHOT.pom under com/clickhouse/clickhouse-java/0.4.2-SNAPSHOT, but it's missing. Looks like all required information is contained within maven-metadata.xml, which we don't handle.

@zhicwu
Copy link
Contributor

zhicwu commented Mar 21, 2023

Just released v0.4.2 and tried on DBeaver, it looks good except classifier can be removed to reduce download size.

image

@zhicwu zhicwu closed this as completed Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants