Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails 2.3.5 generate-all doesn't exist but it's in the documentation

Should it work or has it been removed?

Here's the commands that fail:

grails create-app my_new_app
cd my_new_app
grails generate-all my_new_app.Book

Results in

Script 'GenerateAll' not found, did you mean:.5
   1) CreateFilters
   2) CreateController
   3) CreateIntegrationTest
   4) InstallTemplates
   5) CreateApp_
> Please make a selection or enter Q to quit:

This is according to the documentation at http://grails.org/doc/latest/guide/gettingStarted.html#generatingAnApplication

grails -version
Grails version: 2.3.5
like image 221
Jason Avatar asked Feb 17 '14 20:02

Jason


3 Answers

You need to run

grails compile

Prior to generate-all, as the scaffolding is now in a plugin

like image 140
tim_yates Avatar answered Nov 16 '22 02:11

tim_yates


The scaffolding feature was pulled from core in Grails 2.3.*. Add the scaffolding plugin to BuildConfig.groovy to restore generate-all and static scaffolding functionality.

compile ":scaffolding:2.0.0"

like image 20
Jon Polaski Avatar answered Nov 16 '22 02:11

Jon Polaski


Use the following commands

grails create-app my_new_app
cd my_new_app
grails refresh-dependencies
grails create-domain-class book
grails generate-all my_new_app.Book

This worked for me. I got the idea from the Grails forum: http://grails.1312388.n4.nabble.com/Generate-scripts-missing-from-grails-2-3-3-td4651739.html

like image 39
Jason Avatar answered Nov 16 '22 02:11

Jason