Question

Is it possible to create gant scripts to automate generalized processes.

e.g. Grails provides a default script 'create-app' to create a project using a tomcat container. Now suppose that I want to write my own script that could create projects using jboss as a server. I would like to save this script in a generalized manner so that I can use it to create more projects, rather than save it under some specific projet.

Is it possible to do that?

Was it helpful?

Solution

Yes, save it in $HOME/.grails/scripts. This way it will be available to all Grails installs.

Note that the naming convention is important; if the script starts with an underscore, it cannot be called directly as a script, only included in others (e.g. to store common code and methods). If it ends in an underscore, it can be called outside of a project (e.g. the create-app script is named CreateApp_.groovy). If there's no leading or trailing underscore then it can be called from within a project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top