I created some templates for the auto-generation code by grails install-templates, but some unnecessary files like form.gsp are still created. How can I remove them? I cannot find a config file to modify and create only my templates. Can anyone help me?
I created some templates for the auto-generation code by grails install-templates , but some
Share
Grails builds up the list of templates that it needs to generate from by combining the default set of templates in GRAILS_HOME with the ones installed in your app, with the one in your app taking precedence in the case of a name clash. So if you delete a template from your app’s
src/templatesthen Grails will simply use the built-in version of that template instead. I presume this is deliberate don’t-repeat-yourself behaviour, to allow you to selectively override some of the templates but stick with the defaults for others without having to have a duplicate copy of the ones you haven’t modified.So I don’t think you can prevent the
form.gspfrom being created when yougenerate-views, but if your modified scaffolding templates don’t reference it then it does no harm being there and you can just ignore it. You could create an empty version in yoursrc/templates