We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dff7a5a commit 58aa18eCopy full SHA for 58aa18e
libs/gretty/src/main/groovy/org/akhikhl/gretty/ServletContainerConfig.groovy
@@ -32,8 +32,9 @@ class ServletContainerConfig {
32
boolean alteredDependencies = false
33
File webXmlFile = new File(ProjectUtils.getWebAppDir(proj), 'WEB-INF/web.xml')
34
if(webXmlFile.exists()) {
35
+ String groovyVersion = GroovySystem.version
36
def xmlSlurper = Class
- .forName('groovy.' + (GroovySystem.version.startsWith('4.') ? 'xml' : 'util') + '.XmlSlurper')
37
+ .forName('groovy.' + (groovyVersion.startsWith('2.') || groovyVersion.startsWith('3.') ? 'util' : 'xml') + '.XmlSlurper')
38
.getConstructor()
39
.newInstance()
40
def webXml = xmlSlurper.parse(webXmlFile)
0 commit comments