Search code examples
grailsscaffolding

Grails 3 scaffolding issue


I'm trying to port my project from Grails 2.4 to 3.0. Nothing fancy: 12 Domains, 13 Controllers and a service. Everything works fine, except when I try to include the Scaffolding plugin. I literally follow the manual here, but the syntax must be wrong. Adding the plugin line as specified:

    plugins {
        …
        compile ":scaffolding:2.0.0"
        …
    }

leads to this:

    BUILD FAILED                

Total time: 1.559 secs      
| Error Error initializing classpath: startup failed:
build file 'E:\GrailsIdeaProjects\HcaServer\build.gradle': 17: only id(String) method calls allowed in plugins {} script block

See http://gradle.org/docs/2.3/userguide/plugins.html#sec:plugins_block for information on the plugins {} block

 @ line 17, column 5.
       compile ":scaffolding:2.0.0"
       ^

1 error
 (Use --stacktrace to see the full trace)

Somebody knows the right syntax to include the Scaffolding plugin in Grails 3?

EDIT: Thanks to Casey for pointing me in the right direction: Scaffolding plugin is actually already included in default build.gradle. Anyway, i still get a webpage like this on every controller:

Error: Page Not Found (404)
Path: /*controllerName*/index

I've been using the same syntax as per the manual, declaring a static scaffold = true on each controller. Why do I get a 404 page then? I do have index.gsp, error.gsp and notFound.gsp in my views folder.


Solution

  • After researching for a while, turns out dynamic scaffolding hasn't made it yet into Grails 3: https://groups.google.com/forum/m/#!topic/grails-dev-discuss/6R2YaF96Uts