Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails 3 install-templates only creates a scaffolding directory - no artifacts directory

The main templates I want to modify are the artifacts ones. Anyone knows how to create the artifacts templates?

In addition, it only installed these three files in the scaffolding directory: AsyncController.groovy, AsyncSpec.groovy, ScaffoldedController.groovy.

like image 656
Chris Malan Avatar asked Oct 31 '22 10:10

Chris Malan


1 Answers

In fact, there is a problem with the install-template command. In Grails version 3.1 it doesn't create the artifact directory with the views pages (gsp) as expected.

You just have to create an artifact directory and put your customized view pages in it:

/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/create.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/edit.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/index.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/show.gsp

Regards,

-- Sylvio

like image 81
Sylvio Azevedo Avatar answered Jan 04 '23 15:01

Sylvio Azevedo