gpc / grails-audit-logging-plugin

The Grails Audit Logging Plugin
Apache License 2.0
50 stars 60 forks source link

Version 3.0.0 totally breaks even trivial applications. #169

Closed aadrian closed 6 years ago

aadrian commented 6 years ago

grails-audit-logging-plugin version 3.0.0 seems to totally break even trivial Grails 3.3.5 applications :( .

Please see in this small example: https://github.com/aadrian/grenderingz/tree/audit_logging

After adding the plug-in, nothing works anymore https://github.com/aadrian/grenderingz/commit/44eb3269586530291d58545fe261deaadde27153 :( .

Following the documentation and how this version of the plug-in it's supposed to be different from version 2.x, those are the only changes made that are visible in that commit diff.

Am I missing something? Or is the plug-in indeed broken with Grails 3.3.5?

Thank you.

robertoschwald commented 6 years ago

I don't know whats your problem, as you didn't state it. Here, your example runs...?

[grenderingz master]$ gradle clean
gradlew: Permission denied
gradlew: cannot execute: Undefined error: 0
[grenderingz master]$ chmod 755 gradlew
[grenderingz master*]$ chmod 755 grailsw
[grenderingz master*]$ grails run-app
Using grailsw
| Resolving Dependencies. Please wait...
Download https://repo.grails.org/grails/core/org/grails/plugins/views-gradle/1.2.8/views-gradle-1.2.8.pom
Download https://repo.grails.org/grails/core/org/grails/plugins/views-gradle/1.2.8/views-gradle-1.2.8.jar
Download https://repo.grails.org/grails/core/org/grails/plugins/views-json/1.2.8/views-json-1.2.8.pom
Download https://repo.grails.org/grails/core/org/grails/views-core/1.2.8/views-core-1.2.8.pom
Download https://repo.grails.org/grails/core/org/grails/plugins/views-json/1.2.8/views-json-1.2.8.jar
Download https://repo.grails.org/grails/core/org/grails/views-core/1.2.8/views-core-1.2.8.jar

CONFIGURE SUCCESSFUL

| Running application...
--> Init application ....
-->  ... Initializing data, since the DB was empty ...
--> Init application DONE!
Grails application running at http://localhost:8080 in environment: development
robertoschwald commented 6 years ago

Ah, I see. In your example, audit-logging is not included at all.

robertoschwald commented 6 years ago

Found it. We have springsec plugin dependency as provided in the plugin classpath to be able to compile the SpringSecurityRequestResolver. It seems this is enough that the ControllerMixin gets compiled into the Controller class.

aadrian commented 6 years ago

Ah, I see. In your example, audit-logging is not included at all.

https://github.com/aadrian/grenderingz/blob/audit_logging/build.gradle#L64

As I described, the branch audit_logging has the audit logging code.

longwa commented 6 years ago

I’ll take a look. We are using the plugin in a very large 3.3.6 application with dozens of audited domains and dependencies.

longwa commented 6 years ago

The https://github.com/robertoschwald/grails-audit-logging-plugin/pull/170 should fix this issue. I used the sample app in this ticket to verify the changes.

robertoschwald commented 6 years ago

Please use Version 3.0.1

aadrian commented 6 years ago

@robertoschwald @longwa yes, with 3.0.1 it works again :) . Thank you for the update!