Skip to content

Conversation

@laeubi
Copy link

@laeubi laeubi commented Dec 28, 2022

In the latest release of the JDBC specification there was a requirement added that datasources should promote what methods they implement. H2 implements all methods and could therefore simply publish all.

This also migrates from the org.osgi.enterprise artifact to the more specific org.osgi.service.jdbc one.

FYI @stbischof

@stbischof
Copy link

Lgtm

If maintainer is interested it might be covered by the osgi-tck test

@laeubi
Copy link
Author

laeubi commented Dec 28, 2022

If maintainer is interested it might be covered by the osgi-tck test

I'm currently running the TCK manually because of the way H2 is build.

Beside that the TCK has some issues where h2 behaves correct (as far as I would interpret the spec) bu still will fail the TCK especially:

so I think this must be solved, h2 build needs to be adjusted to use bnd to generate the manifest in a regular maven build and a new tck release is required then it could be included.

@katzyn
Copy link
Contributor

katzyn commented Dec 28, 2022

Thank you for your contribution!

You need to upgrade dependencies in h2/src/tools/org/h2/build/Build.java too. H2 doesn't actually use that pom.xml by itself, an own build system is used:
https://h2database.com/html/build.html#building

@laeubi
Copy link
Author

laeubi commented Dec 28, 2022

You need to upgrade dependencies in h2/src/tools/org/h2/build/Build.java too.

I'll take a look!

H2 doesn't actually use that pom.xml by itself, an own build system is used

Just wondering, is there any specific reason for this? This seems quite complicated and uncommon, looking at the code it seems it mostly doing downloading, setup classpath and executing tools, it seems that something maven-exec plugin could supply as well?

@katzyn
Copy link
Contributor

katzyn commented Dec 28, 2022

Maven is too limited and cannot perform various complex tasks, H2 had a lot of them in the past even for regular build. Many of them were removed due to various reasons, but they can be reintroduced at any moment if we'll need them again. Hypothetically some advanced system such as Gradle can be used instead, but switch to it requires a lot of work without any noticeable benefits.

@laeubi
Copy link
Author

laeubi commented Dec 28, 2022

Maven can be enhanced with custom plugin,so any java code can run as part of maven build, and as the maven build itself already works it seems not so far away... so I don't think gradle or anything special would required here, I think this would really lower the barrier for new contributors.

@laeubi laeubi force-pushed the update_osgi_jdbc_spec branch from 07fb8a6 to 5ede30c Compare December 28, 2022 12:19
@grandinj
Copy link
Contributor

special would required here, I think this would really lower the barrier for new contributors.

Thanks, we already tried that, didn't make any difference in terms of new contributors, made a bunch more unnecessary work for us.

@laeubi laeubi force-pushed the update_osgi_jdbc_spec branch from 5ede30c to b17c70d Compare December 28, 2022 12:33
In the latest release of the JDBC specification there was a requirement
added that datasources should promote what methods they implement. H2
implements all methods and could therefore simply publish all.

This also migrates from the org.osgi.enterprise artifact to the more
specific org.osgi.service.jdbc one.
@laeubi laeubi force-pushed the update_osgi_jdbc_spec branch from b17c70d to caca584 Compare December 28, 2022 13:40
@katzyn katzyn merged commit 0844bc8 into h2database:master Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants