Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ jobs:
find `pwd`/examples -type f -name pom.xml -exec sed -i -e "s|\(<clickhouse-java.version>\).*\(<\)|\1$LIB_VER\2|g" {} \;
for d in $(ls -d `pwd`/examples/*/); do \
if [ -e $d/pom.xml ]; then cd $d && mvn --batch-mode --no-transfer-progress clean compile; fi;
if [ -e $d/gradlew ]; then cd $d && ./gradlew clean build; fi;
done
- name: Save clickhouse-jdbc-all for tests
uses: actions/upload-artifact@v4
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@
backtick-quoted `INSERT` column-name component before the by-name server-schema lookup, matching how the
table and database identifiers are already handled. (https://github.com/ClickHouse/clickhouse-java/issues/2896)

### Docs & Examples

- **[examples]** Converted the remaining Gradle-based example projects (`client-v2-apache-arrow`, `demo-service`,
`demo-kotlin-service`) to Maven so that every project under `examples/` builds with a single, consistent toolchain.
The Gradle wrapper and build scripts were removed and each project now has a standalone `pom.xml`.
(https://github.com/ClickHouse/clickhouse-java/issues/2915)

## 0.10.0-rc1,

[Release Migration Guide](docs/releases/0_10_0.md)
Expand Down
1 change: 0 additions & 1 deletion build_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ LIB_VER=$(grep '<revision>' pom.xml | sed -e 's|[[:space:]]*<[/]*revision>[[:spa
find `pwd`/examples -type f -name pom.xml -exec sed -i -e "s|\(<clickhouse-java.version>\).*\(<\)|\1$LIB_VER\2|g" {} \;
for d in $(ls -d `pwd`/examples/*/); do \
if [ -e $d/pom.xml ]; then cd $d && mvn --batch-mode --no-transfer-progress clean compile; fi;
if [ -e $d/gradlew ]; then cd $d && ./gradlew clean build; fi;
done

2 changes: 1 addition & 1 deletion docs/client-v2-json-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ For these types, callers should obtain the parsed value through

## Examples

Two runnable Gradle examples are provided under `examples/`:
Two runnable Maven examples are provided under `examples/`:

- `examples/client-v2-json-processors` exercises the `client-v2` API
directly, switching between Jackson and Gson factories against a shared sample
Expand Down
12 changes: 0 additions & 12 deletions examples/client-v2-apache-arrow/.gitattributes

This file was deleted.

7 changes: 2 additions & 5 deletions examples/client-v2-apache-arrow/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
# Maven build output
target/
3 changes: 3 additions & 0 deletions examples/client-v2-apache-arrow/.mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED
17 changes: 9 additions & 8 deletions examples/client-v2-apache-arrow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ The example shows:
into another table by streaming the same `VectorSchemaRoot` straight back to
`client.insert(...)`.

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

## Requirements

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

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

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

```shell
./gradlew run
mvn compile exec:java
```

Connection properties can be supplied as system properties:
Expand All @@ -52,7 +53,7 @@ Connection properties can be supplied as system properties:
Example with custom connection properties:

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

```shell
./gradlew run -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG
mvn compile exec:java -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG
```

## Executable Example
Expand Down
58 changes: 0 additions & 58 deletions examples/client-v2-apache-arrow/build.gradle.kts

This file was deleted.

5 changes: 0 additions & 5 deletions examples/client-v2-apache-arrow/gradle.properties

This file was deleted.

22 changes: 0 additions & 22 deletions examples/client-v2-apache-arrow/gradle/libs.versions.toml

This file was deleted.

Binary file not shown.

This file was deleted.

Loading
Loading