The generate-all command does not generate the controller. Only the view are generated.
The bug is in the grails.util.GenerateUtils class
if(VIEWS.equals(type) || ALL.equals(type)) {
LOG.info("Generating views for domain class ["+domainClass.getName()+"]");
generator.generateViews(domainClass,".");
}
else if(CONTROLLER.equals(type)|| ALL.equals(type)) {
LOG.info("Generating controller for domain class ["+domainClass.getName()+"]");
generator.generateController(domainClass,".");
}
else {
LOG.info("Grails was unable to generate templates for unsupported type ["+type+"]");
}
The problem is caused by the else if statement. It should be an independent if. However the else at the end to log an unsupported type need to be changed as well.
Woops. Silly me.