Re: unable to use javascript ScriptEngine in pipeline step implementation

2016-08-18 Thread Jesse Glick
On Thu, Aug 18, 2016 at 2:30 PM, Chris Price wrote: > Is there any specific classloader you'd recommend for use in a plugin > context? Not really. That of some class in your plugin? Of some class in Jenkins core? The parent of that of some class in Jenkins core? You really need

Re: unable to use javascript ScriptEngine in pipeline step implementation

2016-08-18 Thread Chris Price
On Thursday, August 18, 2016 at 10:54:41 AM UTC-7, Jesse Glick wrote: > > On Thu, Aug 18, 2016 at 12:55 PM, Chris Price > wrote: > > ScriptEngineManager manager = new ScriptEngineManager(); > > Probably your `Thread.currentThread().getContextClassLoader()` is not > able

Re: unable to use javascript ScriptEngine in pipeline step implementation

2016-08-18 Thread Jesse Glick
On Thu, Aug 18, 2016 at 12:55 PM, Chris Price wrote: > ScriptEngineManager manager = new ScriptEngineManager(); Probably your `Thread.currentThread().getContextClassLoader()` is not able to “see” the JRE’s engines for some reason a debugger might illuminate. Try using the

unable to use javascript ScriptEngine in pipeline step implementation

2016-08-18 Thread Chris Price
Hi, I have a custom pipeline step I'm writing (in Java, implementing workflow Step/StepExecution). Inside of my step's implementation I need to load some JavaScript code. I started off with this approach: ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine =