Skip to content

Conversation

@jamesfredley
Copy link
Contributor

@jamesfredley jamesfredley commented Jan 16, 2025

In Grails 6.2.3 when trying to make a scaffold Controller I get


grails> generate-all demo.Todo
| Error Command [generate-all] error: groovy/text/Template (Use --stacktrace to see the full trace)

in a brand new application where all I have done previously is
grails> create-domain-class Todo

The same change was applied to the Grails 7 branches in https://github.com/grails/grails-wrapper/pull/25/files

After this PR has been merged, we will release grails-wrapper 4.0.2 and it will be possible to update an existing Grails 6.2.x application using
./grailsw update-wrapper

Users who have not run ./grailsw with Grails 6 also always get the newest version for the Grails version the first time they run ./grailsw`
https://central.sonatype.com/artifact/org.grails/grails6-wrapper

@jamesfredley jamesfredley self-assigned this Jan 16, 2025
@sbglasius
Copy link

sbglasius commented Jan 16, 2025

I see this:

./grailsw update-wrapper
Updating Grails wrapper jar to version: 4.0.1 located in: /home/sbglasius/.grails/wrapper/grails6-wrapper.jar
| Resolving Dependencies. Please wait...

and then it enters into interactive mode which is probably fine.

It's a demo-app so I did:

grails> create-domain-class Demo2
| Created grails-app/domain/demo/Demo2.groovy
| Created src/test/groovy/demo/Demo2Spec.groovy
grails> create-scaffold-controller Demo2
| Error Command [create-scaffold-controller] error: groovy/text/Template (Use --stacktrace to see the full trace)

I then exited the interactive mode and started it again, and tried create-scaffold-controller with the same result.

So something is still not working

@jamesfredley jamesfredley merged commit 6f89407 into 4.0.x Jan 17, 2025
2 checks passed
@jamesfredley jamesfredley deleted the add-groovy-templates branch January 17, 2025 15:18
@jamesfredley
Copy link
Contributor Author

@sbglasius I have merged this PR, completed the https://github.com/grails/grails-wrapper/releases/tag/v4.0.2 release, completed the extra post release steps https://github.com/grails/grails-wrapper/tree/4.0.x?tab=readme-ov-file#release-process and tested it in 6.2.3.

It is ready to test with:

./grailsw update-wrapper

./grailsw update-wrapper
| Starting interactive mode...
| Enter a command name to run. Use TAB for completion:
grails> create-scaffold-controller com.example.Test
| Rendered template ScaffoldedController.groovy to destination grails-app\controllers\com\example\TestController.groovy
grails> generate-all com.example.Test
| Warning Destination file grails-app\controllers\com\example\TestController.groovy already exists, skipping...
| Rendered template Service.groovy to destination grails-app\services\com\example\TestService.groovy
| Rendered template Spec.groovy to destination src\test\groovy\com\example\TestControllerSpec.groovy
| Rendered template ServiceSpec.groovy to destination src\integration-test\groovy\com\example\TestServiceSpec.groovy
| Scaffolding completed for grails-app\domain\com\example\Test.groovy
| Rendered template index.gsp to destination grails-app\views\test\index.gsp
| Rendered template edit.gsp to destination grails-app\views\test\edit.gsp
| Rendered template show.gsp to destination grails-app\views\test\show.gsp
| Rendered template create.gsp to destination grails-app\views\test\create.gsp
| Views generated for grails-app\domain\com\example\Test.groovy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants