Skip to content

Commit 9300d79

Browse files
committed
Merge branch 'main' into sync/release_0.10.0
2 parents 26bbf39 + f1465c5 commit 9300d79

42 files changed

Lines changed: 552 additions & 1288 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ jobs:
6565
find `pwd`/examples -type f -name pom.xml -exec sed -i -e "s|\(<clickhouse-java.version>\).*\(<\)|\1$LIB_VER\2|g" {} \;
6666
for d in $(ls -d `pwd`/examples/*/); do \
6767
if [ -e $d/pom.xml ]; then cd $d && mvn --batch-mode --no-transfer-progress clean compile; fi;
68-
if [ -e $d/gradlew ]; then cd $d && ./gradlew clean build; fi;
6968
done
7069
- name: Save clickhouse-jdbc-all for tests
7170
uses: actions/upload-artifact@v4

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@
6060
backtick-quoted `INSERT` column-name component before the by-name server-schema lookup, matching how the
6161
table and database identifiers are already handled. (https://github.com/ClickHouse/clickhouse-java/issues/2896)
6262

63+
### Docs & Examples
64+
65+
- **[examples]** Converted the remaining Gradle-based example projects (`client-v2-apache-arrow`, `demo-service`,
66+
`demo-kotlin-service`) to Maven so that every project under `examples/` builds with a single, consistent toolchain.
67+
The Gradle wrapper and build scripts were removed and each project now has a standalone `pom.xml`.
68+
(https://github.com/ClickHouse/clickhouse-java/issues/2915)
69+
6370
## 0.10.0-rc1,
6471

6572
[Release Migration Guide](docs/releases/0_10_0.md)

build_examples.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ LIB_VER=$(grep '<revision>' pom.xml | sed -e 's|[[:space:]]*<[/]*revision>[[:spa
33
find `pwd`/examples -type f -name pom.xml -exec sed -i -e "s|\(<clickhouse-java.version>\).*\(<\)|\1$LIB_VER\2|g" {} \;
44
for d in $(ls -d `pwd`/examples/*/); do \
55
if [ -e $d/pom.xml ]; then cd $d && mvn --batch-mode --no-transfer-progress clean compile; fi;
6-
if [ -e $d/gradlew ]; then cd $d && ./gradlew clean build; fi;
76
done
87

client-v2/src/test/java/com/clickhouse/client/metrics/MetricsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void testRegisterMetrics() throws Exception {
6868
Assert.assertEquals((int) leased.value(), 0);
6969

7070
Runnable task = () -> {
71-
final long maxDelay = 15;
71+
final long maxDelay = isCloud() ? 130 : 15;
7272
long t1 = System.currentTimeMillis();
7373
try (QueryResponse response = client.query("SELECT 1").get()) {
7474
long t = System.currentTimeMillis() - t1;

docs/client-v2-json-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ For these types, callers should obtain the parsed value through
616616

617617
## Examples
618618

619-
Two runnable Gradle examples are provided under `examples/`:
619+
Two runnable Maven examples are provided under `examples/`:
620620

621621
- `examples/client-v2-json-processors` exercises the `client-v2` API
622622
directly, switching between Jackson and Gson factories against a shared sample

examples/client-v2-apache-arrow/.gitattributes

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
# Ignore Gradle project-specific cache directory
2-
.gradle
3-
4-
# Ignore Gradle build output directory
5-
build
1+
# Maven build output
2+
target/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--add-opens=java.base/java.nio=ALL-UNNAMED
2+
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
3+
--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED

examples/client-v2-apache-arrow/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@ The example shows:
1414
into another table by streaming the same `VectorSchemaRoot` straight back to
1515
`client.insert(...)`.
1616

17-
Unlike the other examples in this repository, this one is built with **Gradle**
18-
(JDK 17 toolchain) and is not part of the Maven multi-module build.
17+
Like the other examples in this repository, this one is built with **Maven**
18+
(targeting JDK 17). It is a standalone project and is not part of the Maven
19+
multi-module build.
1920

2021
## Requirements
2122

22-
- JDK 17 or newer (the Gradle toolchain will fetch one if it is missing).
23+
- JDK 17 or newer.
2324
- A running ClickHouse server reachable from the machine running the example.
2425

2526
Apache Arrow needs access to direct memory and a few internal JDK APIs. The
26-
required `--add-opens` flags are already wired into `applicationDefaultJvmArgs`
27-
in `build.gradle.kts`, so running the example through Gradle just works:
27+
required `--add-opens` flags are wired into `.mvn/jvm.config`, so running the
28+
example through `mvn ... exec:java` (which runs in the Maven JVM) just works:
2829

2930
```text
3031
--add-opens=java.base/java.nio=ALL-UNNAMED
@@ -39,7 +40,7 @@ If you run the produced jar manually, pass these flags to the JVM yourself.
3940
From this directory:
4041

4142
```shell
42-
./gradlew run
43+
mvn compile exec:java
4344
```
4445

4546
Connection properties can be supplied as system properties:
@@ -52,7 +53,7 @@ Connection properties can be supplied as system properties:
5253
Example with custom connection properties:
5354

5455
```shell
55-
./gradlew run \
56+
mvn compile exec:java \
5657
-DchEndpoint=http://localhost:8123 \
5758
-DchUser=default \
5859
-DchPassword= \
@@ -62,7 +63,7 @@ Example with custom connection properties:
6263
To see the wire-level data flow, raise the SLF4J log level:
6364

6465
```shell
65-
./gradlew run -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG
66+
mvn compile exec:java -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG
6667
```
6768

6869
## Executable Example

examples/client-v2-apache-arrow/build.gradle.kts

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)