Gant internal script not being found

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

Gant internal script not being found

jondo_w
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 java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at grails.util.BuildSettings$_closure1.doCall(BuildSettings.groovy:472)
        at grails.util.BuildSettings$_closure1.call(BuildSettings.groovy)
        at MainCommandScript.run(MainCommandScript:9)
        at MainCommandScript$run.call(Unknown 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?

Thanks,
Darryl