Y-Wakuta commented on code in PR #4281:
URL: https://github.com/apache/polaris/pull/4281#discussion_r3354010976


##########
runtime/server/build.gradle.kts:
##########
@@ -49,13 +49,29 @@ dependencies {
   }
 
   // enforce the Quarkus _platform_ here, to get a consistent and validated 
set of dependencies
-  implementation(enforcedPlatform(libs.quarkus.bom)) {
-    exclude(group = "com.google.protobuf", module = "protobuf-java")
-    exclude(group = "com.google.protobuf", module = "protobuf-java-util")
-  }
+  implementation(enforcedPlatform(libs.quarkus.bom))
   implementation("io.quarkus:quarkus-container-image-docker")
 }
 
+// MySQL is opt-in: the GPL JDBC driver (ASF Category X) is not bundled in the 
default
+// build. `runtime/service` adds the driver to its runtime classpath 
unconditionally for
+// its own `*Mysql*IT` integration tests; here we either strip it (default 
release build,
+// GPL-free) or keep it and wire it up (opt-in via 
`-PincludeMysqlDriver=true`).
+if (project.hasProperty("includeMysqlDriver")) {
+  // Override the `jdbc=false` default in `application.properties` so Quarkus 
wires up
+  // the MySQL named datasource at build time.
+  quarkus { quarkusBuildProperties.put("quarkus.datasource.mysql.jdbc", 
"true") }
+  // The GPL driver is intentionally absent from LICENSE; skip the 
license-report tasks
+  // that would otherwise fail because the driver appears on the classpath.
+  listOf("generateLicenseReport", "checkLicense", "licenseReportZip").forEach 
{ name ->
+    tasks.matching { it.name == name }.configureEach { enabled = false }
+  }
+} else {
+  // Strip the MySQL JDBC driver that `runtime/service` brings in transitively 
for its
+  // own integration tests; the production runner stays GPL-free.
+  configurations.all { exclude(group = "io.quarkus", module = 
"quarkus-jdbc-mysql") }

Review Comment:
   Thanks! I went with this. Tests now live in 
persistence/relational-jdbc-mysql/tests with its own Quarkus server, 
runtime/service is fully MySQL-free, and runtime/server only adds the driver 
under -PincludeMysqlDriver=true (no exclude needed). It also resolved the two 
runtime/service comments above.
   



-- 
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