Hello! I just created a fresh Grails 7.0-RC1 appl...
# questions
d
Hello! I just created a fresh Grails 7.0-RC1 application with Forge
I'm running just a
gradle tasks
and I'm getting this error:
Copy code
FAILURE: Build failed with an exception.

* Where:
Build file '/media/domix/dmxData/developer/tmp/grails7/pupitre/PupitreAdmin/build.gradle' line: 10

* What went wrong:
A problem occurred evaluating root project 'PupitreAdmin'.
> Plugin with id 'org.apache.grails.gradle.grails-web' not found.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.

BUILD FAILED in 679ms
1 actionable task: 1 up-to-date
TBH dunno how to fix this issue
j
You will want to use apply plugin instead of
plugin {id}
since they are published to maven central and not to the gradle plugin portal. the gradle plugin portal does not support snapshots, so we stick with
apply plugin
which does snapshots during development and non-spapshots during release.
Copy code
buildscript {
    repositories {
        mavenCentral()
        maven {
           url = '<https://repo.grails.org/grails/restricted>'
        }
    }
    dependencies { // Not Published to Gradle Plugin Portal
        classpath "cloud.wondrify:asset-pipeline-gradle"
        classpath platform("org.apache.grails:grails-bom:$grailsVersion")
        classpath "org.apache.grails:grails-data-hibernate5"
        classpath "org.apache.grails:grails-gradle-plugins"
    }
}

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: "cloud.wondrify.asset-pipeline"
This was copied from an app generated on https://start.grails.org/
d
oh thanks, will try it, I didn't change anything, just unzipped the file from Forge
j
What features did you select? That may be the cause? I just did the default.
d
I used several... I'm trying to migrate from Grails 6
Copy code
curl --location --request GET '<https://next.grails.org/create/web/pupitre.admin.PupitreAdmin?gorm=HIBERNATE&servlet=TOMCAT&test=SPOCK&javaVersion=JDK_24&features=asciidoctor&features=cache-ehcache&features=cache&features=database-migration&features=geb-with-webdriver-binaries&features=github-workflow-java-ci&features=gradle-settings-file&features=gradle-build-src&features=grails-web-console&features=grails-quartz&features=hibernate-validator&features=logbackGroovy&features=spring-boot-virtual-threads&features=postgres&features=testcontainers>' --output PupitreAdmin.zip
j
There was a bug in buildSrc and settings gradle features in rc1. Using snapshot.grails.org will get your around that issue. But web-drivers-binary is no longer maintained and only works with up to JDK 21 and Gradle 8.6, forge knows this and generates it this way. The new path works much, much better, you just have to have a container environment available during development. https://docs.grails.org/snapshot/guide/upgrading.html#_12_10_container_runtime_environment_is_now_r[…]_standard_geb_functional_and_integration_tests logback-groovy has not yet been updated to Grails 7: https://github.com/apache/grails-core/issues/14874, the spring-logback.xml generated by default supports different environment config, but not more advanced thigs provided by logback-groovy I am looking at these other features still
https://github.com/grails-plugins/grails-cache-ehcache still needs updated for Grails 7. All plugins require some changes.
I created a PR to update a few of the plugins to the latest versions: https://github.com/apache/grails-core/pull/14981/files
d
sweet!
thank you!
j
Copy code
<https://snapshot.grails.org/create/web/pupitre.admin.PupitreAdmin?gorm=HIBERNATE&servlet=TOMCAT&test=SPOCK&javaVersion=JDK_24&features=asciidoctor&features=cache&features=database-migration&features=github-workflow-java-ci&features=gradle-settings-file&features=gradle-build-src&features=grails-web-console&features=grails-quartz&features=hibernate-validator&features=spring-boot-virtual-threads>
plus adjusting the following versions gives a working application
Copy code
implementation "org.apache.grails:grails-quartz:4.0.0-M3"
runtimeOnly "org.grails.plugins:grails-web-console:7.0.0-M3"
and I believe this will work also with postgres and test container
Copy code
<https://snapshot.grails.org/create/web/pupitre.admin.PupitreAdmin?gorm=HIBERNATE&servlet=TOMCAT&test=SPOCK&javaVersion=JDK_24&features=asciidoctor&features=cache&features=database-migration&features=github-workflow-java-ci&features=gradle-settings-file&features=gradle-build-src&features=grails-web-console&features=grails-quartz&features=hibernate-validator&features=spring-boot-virtual-threads&features=postgres&features=testcontainers>
The snapshot forge URL will have those updated versions in ~5 minutes for quartz and web console.
👀 1
Thank you for finding all of those items which need attention. I believe I have captured them in issues or PRs and put them on the board for Grails 7. https://github.com/orgs/apache/projects/487
🙌🏽 1