vbhanuchander-lang commented on code in PR #18056:
URL: https://github.com/apache/iceberg/pull/18056#discussion_r3988842937


##########
build.gradle:
##########
@@ -1261,9 +1261,13 @@ project(':iceberg-bom') {
       def sparkScalaVersions = [
         "3.5": ["2.12", "2.13"],
       ]
+      // Projects that build a distribution rather than a Maven artifact 
disable their publishing
+      // tasks, so their POM is never published and the BOM must not reference 
it.
+      def unpublishedProjects = ['iceberg-kafka-connect-runtime']

Review Comment:
   Agreed on the concern, so I tried the `skipPublish` approach properly before 
answering. It does not work here, and the reason is structural rather than a 
detail I can tidy up. Two experiments, both measured by regenerating the BOM 
POM:
   
   **1. `ext.skipPublish = true` in the runtime project, read with 
`findProperty('skipPublish')` in the BOM** — 30 artifacts, runtime still 
present. The BOM's `constraints` block lives in the *root* build file, and 
Gradle evaluates the root before subproject build files, so at that moment 
`kafka-connect/build.gradle` has not run and the flag does not exist yet. This 
is the same ordering problem as reading task state, one step earlier.
   
   **2. Same flag, with the constraint population deferred inside 
`gradle.projectsEvaluated { }`** so every project has been configured first — 
also 30. Constraints added at that point no longer reach the `java-platform` 
component.
   
   So for a project-owned flag to work it would have to exist before root 
configuration, which in practice means declaring it in `settings.gradle` or 
root `gradle.properties` — still a central list, just moved further away from 
the project it describes.
   
   Given that, the options I can see:
   
   - keep the explicit list as-is;
   - move the list into `settings.gradle` beside the `include`/`name` lines for 
these projects, so adding a distribution-only module puts the declaration and 
the exclusion in the same file;
   - something lazier that I have not found — if you know a way to keep 
`java-platform` constraints open past project evaluation I am happy to try it.
   
   My preference is the second, since it puts the exclusion where a new module 
is registered, but I do not feel strongly. Happy to push whichever you prefer.
   
   For reference the current state is verified: 30 artifacts before, 29 after, 
with `iceberg-kafka-connect`, `-events` and `-transforms` retained.
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to