I have this meaningless test class:
public class Test {
public String MyString() { return "This is my String"; }
}
And this driving script:
Import Test
test = new Test();
Println(test.MyString());
So I've already gotten by the problem in groovyConsole that the import
didn't work from any directory except ".", by putting the path the class is
in directly in CLASSPATH. I put that in by adjusting my system CLASSPATH
variable and I've ensure it survives reboot.
This script works from any directory now using groovyConsole.
However, when I try the same script in Jenkins (either Scriptler or Script
Console) the import fails.
It fails even if I add "-cp <dirpath>" or "-cp <dirpath>" (wasn't sure which
was correct) to the Jenkins command line.
I have rebooted since adjusting CLASSPATH, verified CLASSPATH still works
under groovyConsole and restarted my system and Jenkins any number of times
thinking Jenkins might have a cached version of my environment variables .
. . still no joy.
In short, CLASSPATH doesn't seem to be working for Jenkins Groovy at all.
What am I missing?
Frank