janhoy commented on code in PR #3560:
URL: https://github.com/apache/solr/pull/3560#discussion_r3118323340


##########
gradle/validation/jar-checks.gradle:
##########
@@ -158,7 +158,9 @@ subprojects {
           def file = resolvedArtifact.file
           if (visited.add(file)) {
             infos.add([
-                name           : resolvedArtifact.name,
+                // resolvedArtifact.name may contain path separators when 
Gradle uses capability-based
+                // variant redirection (e.g. guava:android redirects to 
guava:jre). Extract only the filename part.
+                name           : new File(resolvedArtifact.name).name,

Review Comment:
   Explanation by Claude for this change:
   
   Root cause of validateJarLicenses failure: When gRPC 1.80.0 pulls in 
guava:33.5.0-android, Gradle's capability-based variant selection resolves it 
to guava-33.5.0-jre.jar, but resolvedArtifact.name returns a relative path 
../33.5.0-jre/guava-33.5.0-jre instead of just guava. This caused the license 
lookup to traverse out of licensesDir.
   
   Fix in gradle/validation/jar-checks.gradle: In collectJarInfos, extract just 
the filename part of resolvedArtifact.name using new 
File(resolvedArtifact.name).name, which correctly handles path components from 
capability redirects.



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