Friday, March 12, 2010

Grails Goodness: No More Questions

Sometimes when we run Grails commands we get asked questions via user prompts. For example if we invoke $ grails create-domain-class Simple we get a message that it is good practice to use package names and the question "Do you want to continue? (y,n)". We need to answer this question to continue, but what if we are not able to answer the question, for example if the script is run on a continuous integration server? We pass the argument --non-interactive to the grails command and now we don't get a question and the script continues by using the default value for the answer. So in our example we can run $ grails create-domain-class Simple --non-interactive.


Get well Soon Sms said...

Thanks for sharing this very nice and informative post.

Michael said...

This is also very handy when using Hudson. More about this on: http://today.java.net/pub/a/today/2009/06/23/Grails-and-Continuous-Integration.html

Post a Comment