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

Instructions for using Aiven's JDBC connector #292

Merged
merged 5 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# Not available in a public Maven repo,
# so we need to provide a pre-built artifact,
# and install to the local Maven repo.
run: mvn install:install-file -Dfile=libs/jdbc-connector-for-apache-kafka-6.7.0.jar -DgroupId=io.aiven -DartifactId=jdbc-connector-for-apache-kafka -Dversion=6.7.0 -Dpackaging=jar
run: mvn install:install-file -Dfile=libs/jdbc-connector-for-apache-kafka-6.8.0.jar -DgroupId=io.aiven -DartifactId=jdbc-connector-for-apache-kafka -Dversion=6.8.0 -Dpackaging=jar

- name: Test and analyze
env:
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Install test library to local Maven repo
# Not available in a public Maven repo, so we need to provide a pre-built artifact,
# and install to the local Maven repo.
run: mvn install:install-file -Dfile=libs/jdbc-connector-for-apache-kafka-6.7.0.jar -DgroupId=io.aiven -DartifactId=jdbc-connector-for-apache-kafka -Dversion=6.7.0 -Dpackaging=jar
run: mvn install:install-file -Dfile=libs/jdbc-connector-for-apache-kafka-6.8.0.jar -DgroupId=io.aiven -DartifactId=jdbc-connector-for-apache-kafka -Dversion=6.8.0 -Dpackaging=jar

- name: Run integration tests
run: mvn integration-test verify
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ when the project is compiled.

In a few integration tests we use [Aiven's JDBC connector](https://github.com/aiven/jdbc-connector-for-apache-kafka).
Since it's not available in public Maven repositories, it needs to be compiled and installed to a local Maven repository,
so it can be used. For convenience, we provide a prebuilt JAR (in the `libs` directory).
so it can be used. To do so:

1. Run `mvn install:install-file -Dfile=libs/jdbc-connector-for-apache-kafka-6.7.0.jar -DgroupId=io.aiven -DartifactId=jdbc-connector-for-apache-kafka -Dversion=6.7.0 -Dpackaging=jar`
2. Run `mvn clean compile` (so that the needed code is generated)
3. Some IDEs may not automatically use the generated sources. If that's the case, you need to change the project settings in your IDE to include the generated source. In IntelliJ, for example, you do that by going
to File > Project structure > Project Settings > Modules. Then, right-click on `target/generated-source` and select "Sources".
1. Clone the repository: `git clone [email protected]:Aiven-Open/jdbc-connector-for-apache-kafka.git`
hariso marked this conversation as resolved.
Show resolved Hide resolved
2. Change working directory to the repository: `cd jdbc-connector-for-apache-kafka`
3. Check out `v6.8.0`: `git checkout v6.8.0`
4. Build the connector and publish it to the local Maven repository: `./gradlew clean build publishToMavenLocal`

After that, run `mvn clean compile` (this also generates needed code from proto files). Some IDEs may not automatically
use the generated sources. If that's the case, you need to change the project settings in your IDE to include the
generated source. In IntelliJ, for example, you do that by going to File > Project structure > Project Settings > Modules.
Then, right-click on `target/generated-source` and select "Sources".

### Code quality
Code analysis is done through SonarCloud, where we have a [conduitio](https://sonarcloud.io/project/overview?id=conduit-kafka-connect-wrapper) organization.
Expand Down
Binary file removed libs/jdbc-connector-for-apache-kafka-6.7.0.jar
Binary file not shown.
hariso marked this conversation as resolved.
Show resolved Hide resolved
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<dependency>
<groupId>io.aiven</groupId>
<artifactId>jdbc-connector-for-apache-kafka</artifactId>
<version>6.7.0</version>
<version>6.8.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down