Gant internal script not being found

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Gant internal script not being found

I'm creating some utility Gant scripts for a plugin. Reading the Gant documentation, it suggests that one captures common targets in an internal script. I have done this, placing the internal scripts in the plugins scripts folder. The script is correctly named as '_MyInternalScript.groovy' and has no default target defined. However when I attempt to run the main command script from the application base directory, I keep getting the error:

Environment set to development
Error executing script MainCommandScript: _MyInternalScript
java.lang.ClassNotFoundException: _MyInternalScript
        at Method)
        at java.lang.ClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at grails.util.BuildSettings$_closure1.doCall(BuildSettings.groovy:472)
        at grails.util.BuildSettings$
        at MainCommandScript$ Source)
        at gant.Gant.prepareTargets(Gant.groovy:606)
Error executing script CreateRoleMappings: _MyInternalScript

The internal script is correctly referenced from the main script via:

includeTargets << grailsScript("_MyInternalScript")

Are internal Gant scripts not possible for plugins?