-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAppInfoGrailsPlugin.groovy
31 lines (27 loc) · 1 KB
/
AppInfoGrailsPlugin.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import com.burtbeckwith.grails.plugins.appinfo.ContextListener
class AppInfoGrailsPlugin {
String version = '0.4.3'
String grailsVersion = '1.2 > *'
def dependsOn = [dynamicController: '0.2.1 > *',
googleVisualization: '0.2.1 > *',
jquery: '1.4.3 > *']
List pluginExcludes = [
'scripts/CreateAppInfoTestApps.groovy'
]
String author = 'Burt Beckwith'
String authorEmail = '[email protected]'
String title = 'Application Info'
String description = "UI for inspecting various aspects of the application's configuration"
String documentation = 'http://grails.org/plugin/app-info'
def doWithWebDescriptor = { xml ->
def useContextListener = application.config.grails.plugins.appinfo.useContextListener
if (useContextListener == null || (useContextListener instanceof Boolean && useContextListener)) {
def filterMapping = xml.'filter-mapping'
filterMapping[filterMapping.size() - 1] + {
'listener' {
'listener-class'(ContextListener.name)
}
}
}
}
}