matrei commented on issue #15843: URL: https://github.com/apache/grails-core/issues/15843#issuecomment-5885498072
This is fixed as of 7.0.14. ### Cause `s2ui-override` copies the GSPs from `META-INF/templates/views/` in the `grails-spring-security-ui` jar. In 7.0.2 the views were never packaged there, while the `*Controller.groovy.template` files were. That is why the controller got generated and the command then failed on the first GSP, for every type (`auth`, `layout`, `user`, ...). This regressed in grails/grails-spring-security-ui#165 (45e50aeca4, first released in `7.0.0-M3`). The build cleanup there made the task that copies the views into `src/main/templates/views` depend on `copyTemplates`, so the views were only copied after the templates had already been staged for the jar, and a clean build packaged none of them. It was fixed by 7ba62aa93e, which drops that task and configures `copyTemplates` to package `grails-app/views` into `META-INF/templates/views` directly. After 7.0.2, the next published version of the UI plugin was 7.0.14, which is the first one containing the views again: | Version | GSP templates in `META-INF/templates/views/` | |---|---| | `org.grails.plugins:spring-security-ui:4.0.0-RC1` | 45 | | `org.grails.plugins:spring-security-ui:7.0.0-M3` | 0 | | 7.0.0-M4 to 7.0.2 | 0 | | 7.0.14, 7.0.17, 7.2.4, 8.0.0-RC1 | 45 | ### Verification I created an app with Grails 7.0.17, added: ```groovy implementation "org.apache.grails:grails-spring-security" implementation "org.apache.grails:grails-spring-security-ui" ``` and ran: ```bash grails s2ui-override auth grails s2ui-override layout grails s2ui-override user com.example grails s2ui-override register com.example grails s2ui-override securityinfo com.example ``` All of them copied their GSPs, e.g.: ``` | Copied auth.gsp to location grails-app/views/login/auth.gsp | Copied springSecurityUI.gsp to location grails-app/views/layouts/springSecurityUI.gsp | Copied _ajaxLogin.gsp to location grails-app/views/includes/_ajaxLogin.gsp | Rendered template UserController.groovy.template to destination grails-app/controllers/com/example/UserController.groovy | Copied create.gsp to location grails-app/views/user/create.gsp | Copied edit.gsp to location grails-app/views/user/edit.gsp | Copied search.gsp to location grails-app/views/user/search.gsp ``` @arjangch @pshotton upgrading to 7.0.14 or later (`grailsVersion` in `gradle.properties`) should resolve it for you. I'll close this, but please reopen if you still see the error on a current version. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
