grails-core icon indicating copy to clipboard operation
grails-core copied to clipboard

Wrapper crashes and does not start if app contains application.groovy with an import statement

Open codeconsole opened this issue 1 year ago • 1 comments

To replicated behavior, add the following to any app:

/conf/application.groovy

import org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter

build.gradle

dependencies  {
    // ...
    implementation 'org.springframework.security:spring-security-oauth2-client:5.8.14'
}
./grailsw
| Error Error occurred running Grails CLI: startup failed:
Script_6aeee2e21b7e85cf1a3c4edd08792e23.groovy: 1: unable to resolve class org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter
 @ line 1, column 1.
  import org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter
  ^

1 error

codeconsole avatar Sep 18 '24 22:09 codeconsole

https://github.com/grails/grails-wrapper/blob/4.0.x/wrapper/src/main/groovy/grails/init/RunCommand.groovy

calls

https://github.com/grails/grails-core/blob/6.2.x/grails-shell/src/main/groovy/org/grails/cli/GrailsCli.groovy#L587-L588

codeconsole avatar Sep 26 '24 06:09 codeconsole