From: <jt...@hy...> - 2008-07-23 19:11:14
|
Author: jtravis Date: 2008-07-23 12:11:10 -0700 (Wed, 23 Jul 2008) New Revision: 10331 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=10331 Modified: trunk/plugins/groovy-scripting/src/org/hyperic/hq/plugin/groovy/GroovyLanguagePlugin.java Log: Add directories which contain the scripts classes we are looking for. This allows us to have scripts which use other files in the same directory Modified: trunk/plugins/groovy-scripting/src/org/hyperic/hq/plugin/groovy/GroovyLanguagePlugin.java =================================================================== --- trunk/plugins/groovy-scripting/src/org/hyperic/hq/plugin/groovy/GroovyLanguagePlugin.java 2008-07-23 17:54:02 UTC (rev 10330) +++ trunk/plugins/groovy-scripting/src/org/hyperic/hq/plugin/groovy/GroovyLanguagePlugin.java 2008-07-23 19:11:10 UTC (rev 10331) @@ -79,6 +79,11 @@ adjustClassPath(cl); try { + // Also add the directory which contain the groovy script. This + // allows us to add .groovy scripts in scripts/ which are not + // called directly via this function (i.e. only imported by + // groovy scripts, plugin support) + cl.addURL(file.getParentFile().toURL()); return cl.parseClass(file); } catch (Exception e) { throw new PluginException(e.getMessage(), e); |