Open
Description
I went through the documentation but I didn't see anything about how to actually set up this plugin. I added
dependencies {
implementation "org.grails.plugins:mail:4.0.1"
}
to build.gradle under dependencies. Some specific questions I have:
-
Do I also need to add this? I see some other plugins have it but I don't know what purpose it serves:
buildscript { dependencies { // Not Published to Gradle Plugin Portal classpath "org.grails.plugins:mail:4.0.1" } }
-
When running a fresh Grails 6 app I get this error:
2025-04-23 16:26:04.382 WARN --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mailMessageBuilderFactory' defined in grails.plugins.mail.MailConfiguration: Unsatisfied dependency expressed through method 'mailMessageBuilderFactory' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mailMessageContentRenderer' defined in grails.plugins.mail.MailConfiguration: Unsatisfied dependency expressed through method 'mailMessageContentRenderer' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.grails.gsp.GroovyPagesTemplateEngine' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} 2025-04-23 16:26:04.423 INFO --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2025-04-23 16:26:04.436 INFO --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2025-04-23 16:26:04.445 ERROR --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Parameter 0 of method mailMessageContentRenderer in grails.plugins.mail.MailConfiguration required a bean of type 'org.grails.gsp.GroovyPagesTemplateEngine' that could not be found. Action: Consider defining a bean of type 'org.grails.gsp.GroovyPagesTemplateEngine' in your configuration.
I was able to fix it by adding this:
dependencies { implementation "org.grails.plugins:gsp" }
I'm not sure if that's the proper fix as I'm not very familiar with Grails so rather than relying on trial and error I would much prefer to have documentation.
Assuming that is the proper fix and that this plugin depends on org.grails.plugins:gsp
, is it possible to add a dependency on that package to prevent the error altogether?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels