Copilot commented on code in PR #12358:
URL: https://github.com/apache/gravitino/pull/12358#discussion_r3736761720


##########
bundles/iceberg-aliyun-bundle/build.gradle.kts:
##########
@@ -48,10 +52,35 @@ tasks.withType(ShadowJar::class.java) {
     exclude(project(":catalogs:hadoop-common"))
   }
 
+  // :bundles:aliyun pulls Jackson into this fat jar. Relocate it so the 
bundle remains
+  // self-contained without exposing com.fasterxml.jackson classes on the 
server classpath.
+  relocate(
+    "com.fasterxml.jackson",
+    "org.apache.gravitino.iceberg.aliyun.shaded.com.fasterxml.jackson"
+  )
+
+  // POM metadata is not relocated by shadow and would still advertise the 
original
+  // Jackson coordinates.
+  exclude("META-INF/maven/com.fasterxml.jackson.core/**")
+  exclude("META-INF/maven/com.fasterxml.jackson.datatype/**")
+  exclude("META-INF/maven/com.fasterxml.jackson.module/**")
+  exclude("META-INF/maven/com.fasterxml.jackson/**")
+
   mergeServiceFiles()
 }
 
 tasks.jar {
   dependsOn(tasks.named("shadowJar"))
   archiveClassifier.set("empty")
 }
+
+tasks.test {
+  val shadowJar = tasks.named<ShadowJar>("shadowJar")
+  dependsOn(shadowJar)

Review Comment:
   Declare the generated archive as an input to `test`. `dependsOn` only 
orders/builds `shadowJar`; it does not track the archive contents, so an 
incremental build can mark this regression test `UP-TO-DATE` after a 
shadow-only output change and skip inspecting the new jar.



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