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

453 Views Asked by At

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.

1

There are 1 best solutions below

2
On

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