You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe it should automatically create the resources.groovy file if it does not exists, otherwise it should add to the existing file.
Actual Behaviour
The build failed while running the command
./gradlew runCommand -Pargs="s2-quickstart example.ssdemo User Role"
The Command Line Logs:
➜ ssdemo ./gradlew runCommand -Pargs="s2-quickstart com.package.app User Role"
> Task :runCommand
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Grails application running at http://localhost:0 in environment: development
| :runCommand
Creating User class User in package com.package.app
|
Creating Role class Role in package com.package.app
Rendered template PersonWithoutInjection.groovy.template to destination grails-app/domain/com/package/app/User.groovy
Rendered template PersonPasswordEncoderListener.groovy.template to destination src/main/groovy/com/package/app/UserPasswordEncoderListener.groovy
| Error Command execution error: grails-app/conf/spring/resources.groovy (No such file or directory)
> Task :runCommand FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':runCommand'.
> Process 'command '/Users/behl/.sdkman/candidates/java/11.0.17-zulu/zulu-11.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 9s
Steps To Reproduce
Either Forge from https://start.grails.org or create new Grails application from the Grails CLI.
grails create-webapp example.ssdemo
Add the Spring Security Core Plugin dependency to the build.gradle file, as:
@puneetbehl Rather than the problem being resources.groovy, in my experience it's the directory grails-app/conf/spring not being created beforehand. Whether that's something grails create-app should do or the s2-quickstart invocation should check and fix, I don't know.
But for sure / confirmed, if I create the grails-app/conf/spring directory before running s2-quickstart, all goes according to plan.
update
In my case, the s2-quickstart fails after creating User.groovy in the grails-app/domain directory and UserPasswordEncoderListener.groovy in the src/main/groovy directory. If I delete those two files and create the grails-app/conf/spring directory and then re-run s2-quickstart, I end up with a working situation and seemingly no ill effects.
@puneetbehl I think you must be correct. Do other parts of the Grails ecosystem use grails-app/conf/spring? If so, do they create the directory if necessary?
Expected Behavior
I believe it should automatically create the
resources.groovy
file if it does not exists, otherwise it should add to the existing file.Actual Behaviour
The build failed while running the command
The Command Line Logs:
Steps To Reproduce
s2-quickstart
command from Gradle as:Environment Information
Example Application
No response
Version
6.1.2
The text was updated successfully, but these errors were encountered: