I'm using Grails 2.3.8 and I'd like to enhance some existing classes by using a Groovy Extension Module.
I know how to create the JAR for an extension module and successfully apply it when running command line Groovy code such as:
groovy -classpath myext.jar SomeFile.groovy
However, how do I get myext.jar into Grails? I've already tried two techniques and neither seem to work, even though the JAR file is found by Grails in both cases:
- Edit BuildConfig.groovy and add dependencies { compile ':myext.jar:1.0' }
- Add myext.jar into the Grails "lib" subdir
Is the below technique the right approach? Looks a bit hackish:
Note that I'm using Grails to build my project, not Gradle. Thanks!