ilPittiz
08/13/2025, 2:31 PMbuild.gradle is this
plugins {
id "war"
id "idea"
id "eclipse"
}
// Not Published to Gradle Plugin Portal
apply plugin: "org.apache.grails.gradle.grails-web"
apply plugin: "org.apache.grails.gradle.grails-gsp"
apply plugin: "org.apache.grails.gradle.grails-gson"
group = "grails7"
repositories {
mavenCentral()
maven {
url = '<https://repo.grails.org/grails/restricted>'
}
}
dependencies {
profile "org.apache.grails.profiles:web"
developmentOnly "org.springframework.boot:spring-boot-devtools" // Spring Boot DevTools may cause performance slowdowns or compatibility issues on larger applications
testAndDevelopmentOnly "org.webjars.npm:bootstrap"
testAndDevelopmentOnly "org.webjars.npm:bootstrap-icons"
testAndDevelopmentOnly "org.webjars.npm:jquery"
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
[...]
implementation "org.springframework.boot:spring-boot-starter-validation"
console "org.apache.grails:grails-console"
runtimeOnly "org.fusesource.jansi:jansi"
[...]
testImplementation "org.testcontainers:testcontainers"
}
compileJava.options.release = 17
tasks.withType(Test) {
useJUnitPlatform()
}
When IntelliJ syncs the project I get the error
A problem occurred evaluating root project 'grails7_grailsforge'.
> Plugin with id 'org.apache.grails.gradle.grails-web' not found.
The same occurs for the other 2 apply plugin: statements. If I comment them, I get another error
> Could not find method profile() for arguments [org.apache.grails.profiles:web] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
and then the same Could not find method error occurs for developmentOnly, testAndDevelopmentOnly and console methods.
What am I missing here? Thanks in advance for any advice!jdaugherty
08/13/2025, 4:19 PMjdaugherty
08/13/2025, 4:19 PMilPittiz
08/13/2025, 4:24 PMdependencies block in buildSrc/build.gradle with the one from my Grails 6 app. Sorry about that!
The content of the file as downloaded from Grails Forge is this
// load the root gradle.properties only for properties not already set
// (e.g., buildSrc/gradle.properties or by environment variables like ORG_GRADLE_PROJECT_grailsVersion=7.0.0)
// <https://github.com/gradle/gradle/issues/2534>
def props = new Properties()
file('../gradle.properties').withInputStream { props.load(it) }
props.each { key, val ->
if (!project.hasProperty(key)) {
project.ext."$key" = val
}
}
repositories {
mavenCentral()
maven {
url = '<https://repo.grails.org/grails/restricted>'
}
}
dependencies {
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
implementation "org.apache.grails:grails-gradle-plugins"
}
But now when IntelliJ syncs the project I get another error:
Could not resolve all artifacts for configuration ':buildSrc:buildScriptClasspath'.
> Could not resolve org.apache.grails:grails-gradle-plugins.
Required by:
project :buildSrc
> Dependency requires at least JVM runtime version 17. This build uses a Java 11 JVM.
As I wrote before, I’m sure I configured the project SDK to version 17.jdaugherty
08/13/2025, 4:25 PMjdaugherty
08/13/2025, 4:25 PMilPittiz
08/13/2025, 4:39 PMilPittiz
08/13/2025, 4:41 PMgrails-layout dependency) when I execute bootRun task i get this runtime error:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jspViewResolver': Cannot resolve reference to bean 'groovyPagesTemplateEngine' while setting bean property 'templateEngine'
After commenting the dependency the app starts up correctlyilPittiz
08/13/2025, 4:41 PMCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jspViewResolver': Cannot resolve reference to bean 'groovyPagesTemplateEngine' while setting bean property 'templateEngine'
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'groovyPagesTemplateEngine': Cannot resolve reference to bean 'gspTagLibraryLookup' while setting bean property 'tagLibraryLookup'
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gspTagLibraryLookup': Error creating bean with name 'org.grails.plugins.web.taglib.RenderGrailsLayoutTagLib': Failed properties: Property 'grailsApplication' threw exception: java.lang.NoSuchFieldError: CONFIG_PROPERTY_GSP_GRAILS_LAYOUT_PREPROCESS
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.grails.plugins.web.taglib.RenderGrailsLayoutTagLib': Failed properties: Property 'grailsApplication' threw exception: java.lang.NoSuchFieldError: CONFIG_PROPERTY_GSP_GRAILS_LAYOUT_PREPROCESS
Caused by: org.springframework.beans.PropertyBatchUpdateException: Failed properties: Property 'grailsApplication' threw exception: java.lang.NoSuchFieldError: CONFIG_PROPERTY_GSP_GRAILS_LAYOUT_PREPROCESSJames Fredley
08/13/2025, 4:48 PMjdaugherty
08/13/2025, 5:05 PMjdaugherty
08/13/2025, 5:05 PMjdaugherty
08/13/2025, 5:07 PMilPittiz
08/22/2025, 5:14 PM./gradlew build I get the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all artifacts for configuration ':buildSrc:buildScriptClasspath'.
> Could not resolve org.apache.grails:grails-gradle-plugins.
Required by:
project :buildSrc
> Dependency requires at least JVM runtime version 17. This build uses a Java 11 JVM.
> There is 1 more failure with an identical cause.
The content from buildSrc/build.gradle is the same as shown a few messages above. Again, in IntelliJ IDEA I made sure both the project SDK and Gradle JVM are set to 17. I’m sorry, I’m still trying to wrap my head around the project config 😓 Thanks for your patienceJames Fredley
08/22/2025, 5:56 PMJames Fredley
08/22/2025, 5:57 PMJames Fredley
08/22/2025, 5:59 PMilPittiz
08/22/2025, 7:57 PM