oscerd opened a new pull request, #1854:
URL: https://github.com/apache/camel-kafka-connector/pull/1854

   Fixes #1767.
   
   ### Problem
   
   1. **SQL Server, MySQL, MariaDB, Oracle.** These Kamelets don't declare 
their JDBC driver, so the generated connectors don't ship one. The task fails 
with `Cannot load JDBC driver class '...'` until the driver jar is added to the 
connector's plugin directory. The Kamelet descriptions used to say this, but 
the note was lost when they were shortened to one line, and our docs never 
covered it.
   2. **PostgreSQL.** The PostgreSQL Kamelets do declare 
`org.postgresql:postgresql`. However, `parent/pom.xml` manages that artifact 
with `<scope>test</scope>` (for the itests), the generated connector poms 
inherit the scope, and the assembly drops the jar. The 4.22.0 packages of 
`camel-postgresql-source-kafka-connector` and 
`camel-postgresql-sink-kafka-connector` on Maven Central contain no driver; 
4.18.0 and 4.10.3 don't either. A scan of every connector pom shows these two 
are the only connectors that inherit a test scope.
   
   ### Change
   
   - **Scope fix.** `parent/pom.xml` no longer puts a test scope on the managed 
PostgreSQL driver. A comment explains why. `itests-jdbc` and `itests-sql` 
already declare `<scope>test</scope>` themselves.
   - **Docs.** `getting-started-with-packages.adoc` has a new section, 
"Connectors that need a JDBC driver":
     - which connectors ship their driver (PostgreSQL) and which don't;
     - for the ones that don't, the driver class (from the 4.22.0 Kamelets) and 
the Maven coordinates;
     - that the jar goes in the connector's own plugin directory, because of 
Kafka Connect plugin isolation, with an example.
   
   ### Verification
   
   The full reactor build `./mvnw clean verify -DskipTests` succeeds. Both 
PostgreSQL packages now contain the driver:
   
   ```
   camel-postgresql-source-kafka-connector/postgresql-42.7.13.jar
   camel-postgresql-sink-kafka-connector/postgresql-42.7.13.jar
   ```
   
   The driver coordinates and the example download URL were checked against 
Maven Central.
   
   A note on licensing: the thread says the SQL Server driver can't be bundled 
for ASF licensing reasons, but `mssql-jdbc` is MIT-licensed (ASF Category A). 
Bundling it would be a Kamelet change (or a 
`camel-kafka-connector-kamelet-fix-dependencies.properties` entry here), so 
it's left out of this PR. The MySQL (GPL) and MariaDB (LGPL) drivers can't be 
bundled, and the Oracle driver is under a proprietary license.
   
   _Claude Code on behalf of Andrea Cosentino_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to