bito-code-review[bot] commented on PR #15766:
URL: https://github.com/apache/grails-core/pull/15766#issuecomment-4842986076

   <!-- Bito Reply -->
   The implementation uses `resolutionStrategy.eachDependency` to override 
versions for `org.sitemesh` artifacts, which is a valid approach for forcing a 
specific version when dependency management rules from a BOM are causing 
issues. If this is not working as expected, it may be because 
`resolutionStrategy.eachDependency` rules are applied per configuration, and if 
the dependency is resolved in a configuration that is not being configured or 
is configured before this block, the rule might not be applied. Additionally, 
ensure that `grailsBomProject` is correctly resolved and that 
`bomDependencyVersions` contains the expected keys at the time this script 
executes.
   
   **gradle/functional-test-config.gradle**
   ```
   configurations.configureEach {
       resolutionStrategy.eachDependency {
           if (requested.group == 'org.sitemesh') {
               String localVersion = null
               if (requested.name == 'spring-webmvc-sitemesh') {
                   localVersion = 
localBomVersions['spring-webmvc-sitemesh.version']
               } else if (requested.name == 'spring-boot-starter-sitemesh') {
                   localVersion = localBomVersions['starter-sitemesh.version']
               }
               if (localVersion) {
                   useVersion(localVersion)
                   because('Prevent stale published snapshot BOM from applying 
a non-existent sitemesh version')
               }
           }
       }
   }
   ```


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