github-actions[bot] commented on code in PR #41659:
URL: https://github.com/apache/beam/pull/41659#discussion_r4688439599


##########
buildSrc/src/main/groovy/org/apache/beam/gradle/VendorJavaPlugin.groovy:
##########
@@ -156,6 +159,23 @@ artifactId=${project.name}
             if (unexpectedlyExposedClasses.files) {
               throw new GradleException("$it exposed classes outside of 
org.apache.beam namespace: ${unexpectedlyExposedClasses.files}")
             }
+            FileTree leakedMavenMetadata = project.zipTree(it).matching {
+              include "META-INF/maven/**"
+              exclude "META-INF/maven/${project.group}/${project.name}/**"
+            }
+            if (leakedMavenMetadata.files) {
+              throw new GradleException("$it leaked third-party Maven 
descriptors: ${leakedMavenMetadata.files}")
+            }
+            if (project.hasProperty("vendoredDependenciesOnly")) {
+              Set<String> ownMavenFiles = project.zipTree(it).matching {

Review Comment:
   **🟢 Nit / Minor**: `VendorJavaPlugin` configures the Maven publication with 
`groupId = config.groupId` and `artifactId = config.artifactId`, whereas 
`project.name` is the Gradle subproject directory name (for example, 
`calcite-1_40_0` instead of `beam-vendor-calcite-1_40_0`). While this matches 
the existing `into("META-INF/maven/${project.group}/${project.name}")` copy 
specs below, standard Maven archiver conventions place descriptors under 
`META-INF/maven/<groupId>/<artifactId>/`. Consider aligning the 
`pom.properties` generation, `shadowJar` `into(...)` paths, and these 
validation checks to use `${config.groupId}/${config.artifactId}` (or 
`${project.group}/${project.archivesBaseName}`), or extracting the target path 
into a shared variable to avoid duplication.



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