grails compile
is failing to resolve grails.plugins.orm.auditable.AuditEventType
in application.groovy
.
I have included the plugin in build.gradle
dependencies {
// ... other dependencies ...
compile 'org.grails.plugins:audit-logging:4.0.3'
// ... other dependencies ...
}
import grails.plugins.orm.auditable.AuditEventType
// ... other config ...
grails.plugin.auditLog.auditDomainClassName = "us.cloudcard.api.AuditLogEvent"
grails.plugin.auditLog.logFullClassName = false
grails.plugin.auditLog.defaultActor = "foo"
grails.plugin.auditLog.verbose = false
grails.plugin.auditLog.verboseEvents = [AuditEventType.UPDATE]
user@host dir % grails compile
| Error Error occurred running Grails CLI: startup failed:
script1644337921704582166752.groovy: 1: unable to resolve class grails.plugins.orm.auditable.AuditEventType
@ line 1, column 1.
import grails.plugins.orm.auditable.AuditEventType
^
1 error
I found a workaround. If you remove the import and instead put the fully qualified class name in the config item, it works fine. I don't really like this because I don't understand why it works when the import doesn't.
// don't import AuditEventType
grails.plugin.auditLog.auditDomainClassName = "us.cloudcard.api.AuditLogEvent"
grails.plugin.auditLog.logFullClassName = false
grails.plugin.auditLog.defaultActor = "foo"
grails.plugin.auditLog.verbose = false
grails.plugin.auditLog.verboseEvents = [grails.plugins.orm.auditable.AuditEventType.UPDATE]