Skip to content

Conversation

@jamesfredley
Copy link
Contributor

@jamesfredley jamesfredley commented Jun 24, 2025

Apply changes from apache/grails-forge#600

@jamesfredley jamesfredley added this to the grails:7.0.0-RC1 milestone Jun 24, 2025
@jamesfredley jamesfredley moved this to In Progress in Apache Grails Jun 24, 2025
@jamesfredley jamesfredley self-assigned this Jun 24, 2025
@matrei
Copy link
Contributor

matrei commented Jun 24, 2025

I'm not sure we need to add grails-bom as a platform to testAndDevelopmentOnly as it is a Spring configuration and we are adding the bom to the Spring Dependency Management Plugin in GrailsGradlePlugin. It seems to work without it.

@jamesfredley
Copy link
Contributor Author

I was glad to remove grails-bom as a platform on testAndDevelopmentOnly. It appeared to be required when we switched from implementation to developmentOnly (https://github.com/apache/grails-core/actions/workflows/gradle.yml?query=branch%3Awebjars-developmentOnly)

@jamesfredley
Copy link
Contributor Author

* What went wrong: Execution failed for task ':grails-test-examples-namespaces:bootJar'. > Could not resolve all files for configuration ':grails-test-examples-namespaces:testAndDevelopmentOnly'. > Could not find org.webjars.npm:jquery:. Required by: project :grails-test-examples-namespaces 
@matrei
Copy link
Contributor

matrei commented Jun 25, 2025

* What went wrong: Execution failed for task ':grails-test-examples-namespaces:bootJar'. > Could not resolve all files for configuration ':grails-test-examples-namespaces:testAndDevelopmentOnly'. > Could not find org.webjars.npm:jquery:. Required by: project :grails-test-examples-namespaces 

That's interesting. Gradle seems to be able to resolve the webjar versions in apps generated by Forge, without the platform added.

@matrei
Copy link
Contributor

matrei commented Jun 25, 2025

Aha, this is why the platform is needed in the functional test apps:

springDependencyManagement = false

@jamesfredley
Copy link
Contributor Author

Based on

grails {
// WARNING: enabling spring dependency management in core can have unintended side effects.
// since it loads the bom via a pom file, it can't use a gradle project() reference
// this means you MUST publish locally via ./gradlew :grails-bom:publishMavenPublicationToLocalBomRepository
// this causes unexpected version mismatches in the various plugin projects
springDependencyManagement = false
}

Given we use project() in these test projects, it appears we need to keep the dependency management plugin disabled and add grails-bom as a platform for testAndDevelopmentOnly.

This is different than generated apps, but we are moving in this direction: #14142

@jamesfredley jamesfredley merged commit 9832f61 into 7.0.x Jun 25, 2025
50 of 53 checks passed
@jamesfredley jamesfredley deleted the test-and-development-only branch June 25, 2025 22:09
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache Grails Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants