From 4d64425775a5e4162528531baa177908342a17a2 Mon Sep 17 00:00:00 2001 From: Mario Meltzow Date: Fri, 15 Apr 2016 09:27:52 +0200 Subject: [PATCH 1/5] remove eclipse things --- .settings/org.codehaus.groovy.eclipse.preferences.prefs | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .settings/org.codehaus.groovy.eclipse.preferences.prefs diff --git a/.settings/org.codehaus.groovy.eclipse.preferences.prefs b/.settings/org.codehaus.groovy.eclipse.preferences.prefs deleted file mode 100644 index bf339c7..0000000 --- a/.settings/org.codehaus.groovy.eclipse.preferences.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Created by grails -eclipse.preferences.version=1 -groovy.dont.generate.class.files=true From f210adc6ab962f2e17269860ebf0f1d24d7fe3f6 Mon Sep 17 00:00:00 2001 From: Mario Meltzow Date: Fri, 15 Apr 2016 09:31:04 +0200 Subject: [PATCH 2/5] ignore more eclipse things --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dff4636..16c96a8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ out .idea .settings plugin.xml - +target-eclipse From a0c38b6b640b18198b61667eb01b6e10b3ed178c Mon Sep 17 00:00:00 2001 From: Mario Meltzow Date: Fri, 15 Apr 2016 12:17:10 +0200 Subject: [PATCH 3/5] fix generic things + name file UserDataFilter UserDataFilters + ignore eclipse things + some file are not needed in grails plugin --- .gitignore | 2 ++ ...taFilter.groovy => UserDataFilters.groovy} | 2 -- grails-app/views/error.gsp | 11 ------- web-app/WEB-INF/applicationContext.xml | 33 ------------------- web-app/WEB-INF/sitemesh.xml | 14 -------- 5 files changed, 2 insertions(+), 60 deletions(-) rename grails-app/conf/{UserDataFilter.groovy => UserDataFilters.groovy} (90%) delete mode 100644 grails-app/views/error.gsp delete mode 100644 web-app/WEB-INF/applicationContext.xml delete mode 100644 web-app/WEB-INF/sitemesh.xml diff --git a/.gitignore b/.gitignore index 16c96a8..c708f67 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ out .settings plugin.xml target-eclipse +.project +.classpath diff --git a/grails-app/conf/UserDataFilter.groovy b/grails-app/conf/UserDataFilters.groovy similarity index 90% rename from grails-app/conf/UserDataFilter.groovy rename to grails-app/conf/UserDataFilters.groovy index 004269b..a0c519f 100644 --- a/grails-app/conf/UserDataFilter.groovy +++ b/grails-app/conf/UserDataFilters.groovy @@ -1,5 +1,3 @@ -package grails.plugins.airbrake.test - class UserDataFilters { def airbrakeService diff --git a/grails-app/views/error.gsp b/grails-app/views/error.gsp deleted file mode 100644 index 64a0b08..0000000 --- a/grails-app/views/error.gsp +++ /dev/null @@ -1,11 +0,0 @@ - - - - Grails Runtime Exception - - - - - - - \ No newline at end of file diff --git a/web-app/WEB-INF/applicationContext.xml b/web-app/WEB-INF/applicationContext.xml deleted file mode 100644 index 69fbef3..0000000 --- a/web-app/WEB-INF/applicationContext.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - Grails application factory bean - - - - - - A bean that manages Grails plugins - - - - - - - - - - - - - - - - utf-8 - - - \ No newline at end of file diff --git a/web-app/WEB-INF/sitemesh.xml b/web-app/WEB-INF/sitemesh.xml deleted file mode 100644 index 72399ce..0000000 --- a/web-app/WEB-INF/sitemesh.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - \ No newline at end of file From 51d2700d0424388b4a27bdbc0c1f9ed972e12a09 Mon Sep 17 00:00:00 2001 From: Mario Meltzow Date: Fri, 15 Apr 2016 12:19:44 +0200 Subject: [PATCH 4/5] increase version to 0.9.5 because the grails version are increased (to 2.4.5) + fix Buildconfig for that grails version --- AirbrakeGrailsPlugin.groovy | 6 +++--- application.properties | 3 +-- grails-app/conf/BuildConfig.groovy | 20 +++++++++++++++----- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/AirbrakeGrailsPlugin.groovy b/AirbrakeGrailsPlugin.groovy index b0caa1e..ec613a3 100644 --- a/AirbrakeGrailsPlugin.groovy +++ b/AirbrakeGrailsPlugin.groovy @@ -5,9 +5,9 @@ import grails.plugins.airbrake.Configuration class AirbrakeGrailsPlugin { // the plugin version - def version = '0.9.4' + def version = '0.9.5' // the version or versions of Grails the plugin is designed for - def grailsVersion = "2.0.0 > *" + def grailsVersion = "2.4.5 > *" def pluginExcludes = [ "grails-app/conf/**", "grails-app/views/**", @@ -25,7 +25,7 @@ class AirbrakeGrailsPlugin { def license = "APACHE" def developers = [ [ name: "Phuong LeCong", email: "phuong@reteltechnologies.com" ], [ name: "Jon Palmer", email: "jpalmer@care.com" ], - [name: 'Donal Murtagh']] + [name: 'Donal Murtagh'],[name: 'Mario Meltzow', email: 'meltzow@invencom.de']] def issueManagement = [ system: "GitHub", url: "https://github.com/cavneb/airbrake-grails/issues" ] def scm = [ url: AirbrakeNotifier.NOTIFIER_URL ] diff --git a/application.properties b/application.properties index 569915a..78c9670 100644 --- a/application.properties +++ b/application.properties @@ -1,4 +1,3 @@ #Grails Metadata file #Wed Nov 28 23:11:01 EST 2012 -app.grails.version=2.1.1 -plugins.tomcat=2.1.1 +app.grails.version=2.4.5 diff --git a/grails-app/conf/BuildConfig.groovy b/grails-app/conf/BuildConfig.groovy index ff99bbc..eda4b6f 100644 --- a/grails-app/conf/BuildConfig.groovy +++ b/grails-app/conf/BuildConfig.groovy @@ -1,20 +1,30 @@ grails.project.work.dir = "target" +grails.project.dependency.resolver = "maven" // or ivy grails.project.dependency.resolution = { // inherit Grails' default dependencies inherits("global") { + checksums true // Whether to verify checksums on resolve + legacyResolve false // uncomment to disable ehcache // excludes 'ehcache' } log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose' repositories { - grailsCentral() + inherits true // Whether to inherit repository definitions from plugins + grailsPlugins() + grailsHome() + grailsCentral() + mavenCentral() } - +// dependencies { +// compile 'org.apache.commons:commons-lang3:3.4' +// } + plugins { - build(":release:2.2.1", ":rest-client-builder:1.0.2", ":tomcat:$grailsVersion") { - export = false - } + build(":release:3.1.2", ":rest-client-builder:2.1.1") { + export = false + } test(':spock:0.7') { export = false } From e12dcbd24a3e963e4b0cb7c4e5760cb4e87a26f6 Mon Sep 17 00:00:00 2001 From: Mario Meltzow Date: Fri, 15 Apr 2016 12:20:20 +0200 Subject: [PATCH 5/5] add all stacktraces in all throwables. --- src/groovy/grails/plugins/airbrake/Notice.groovy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/groovy/grails/plugins/airbrake/Notice.groovy b/src/groovy/grails/plugins/airbrake/Notice.groovy index 2bb4800..6944580 100644 --- a/src/groovy/grails/plugins/airbrake/Notice.groovy +++ b/src/groovy/grails/plugins/airbrake/Notice.groovy @@ -2,6 +2,8 @@ package grails.plugins.airbrake import groovy.transform.ToString import groovy.xml.MarkupBuilder + +import org.apache.commons.lang.exception.ExceptionUtils; import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest import org.springframework.web.context.request.RequestContextHolder import org.codehaus.groovy.grails.exceptions.StackTraceFilterer @@ -149,7 +151,10 @@ class Notice { this.env = args.env this.cgiData = args.cgiData ?: getCgiDataFromRequest(webRequest) this.session = args.session ?: getSessionData(webRequest) - this.backtrace = parseBacktrace(throwable?.stackTrace ?: args.backtrace) + + def stacktraceList = throwable? (ExceptionUtils.getThrowableList(throwable).collect { it.stackTrace}.flatten()) :[] + + this.backtrace = parseBacktrace(throwable? stacktraceList : args.backtrace) this.errorClass = throwable?.class?.name ?: args.errorClass // Grails creates a really long error message for uncaught exceptions. Essentially a combination of all the webRequest meta data. // However it creates very unhelpful messages for airbrake so we just prefer the simpler message on the throwable