It might be redundant in this case, but I tend to treat many publicity classes like mixins
String.metaClass.mixin org.apache.commons.io.StringUtils String.metaClass.mixin org.apache.commons.io.FilenameUtils etc
It allows you
String filename = '/tmp/hello-world.txt' def fileWithoutExt = filename.removeExtension()
Which one I mix depends on the requirements of the script, but I often use this template. This allows me to easily use the methods that I use to use without all the static classes or import references.
Michael rutherfurd
source share