public MojarraGroovyClassLoader(GroovyScriptEngine gse) { super(new URL[0], gse.getGroovyClassLoader()); gse.getGroovyClassLoader().setShouldRecompile(Boolean.TRUE); this.gse = gse; }
public static GroovyScriptEngine createScriptEngine(File classpathFile, ClassLoader parent) { CompilerConfiguration cc = new CompilerConfiguration(CompilerConfiguration.DEFAULT); String classpath = classpathFile.getAbsolutePath(); cc.setClasspath(classpath); cc.setRecompileGroovySource(true); GroovyScriptEngine scriptEngine; try { scriptEngine = new GroovyScriptEngine(new URL[] { classpathFile.toURI().toURL() }, parent); } catch (IOException e) { throw new Error(e); } scriptEngine.setConfig(cc); scriptEngine.getGroovyClassLoader().setShouldRecompile(true); return scriptEngine; } }
gcl.setShouldRecompile(true); try
@Override public void start() throws SBonitaException { groovyClassLoader = new GroovyClassLoader(classLoaderService.getLocalClassLoader(ScopeType.TENANT.name(), tenantId)); groovyClassLoader.setShouldRecompile(true); try { final File folder = getBonitaHomeServer().getSecurityScriptsFolder(tenantId); groovyClassLoader.addClasspath(folder.getAbsolutePath()); } catch (BonitaHomeNotSetException | IOException e) { throw new SExecutionException(e); } }
@Override public void start() throws SBonitaException { groovyClassLoader = new GroovyClassLoader(classLoaderService.getLocalClassLoader(ScopeType.TENANT.name(), tenantId)); groovyClassLoader.setShouldRecompile(true); try { final File folder = getBonitaHomeServer().getSecurityScriptsFolder(tenantId); groovyClassLoader.addClasspath(folder.getAbsolutePath()); } catch (BonitaHomeNotSetException | IOException e) { throw new SExecutionException(e); } }
public void resetGroovyScriptEngine() throws FileSystemException { CompilerConfiguration cc = new CompilerConfiguration(CompilerConfiguration.DEFAULT); try { String classpath = this.root.getName().getPath(); cc.setClasspath(classpath); } catch (Exception e) { logger.debug("Could not set classpath", e); } cc.setRecompileGroovySource(true); groovyScriptEngine = new GroovyScriptEngine(new URL[] { this.root.getURL() }, getClassLoader()); groovyScriptEngine.setConfig(cc); groovyScriptEngine.getGroovyClassLoader().setShouldRecompile(true); }
if (!classpathList.isEmpty()) { GroovyClassLoader gloader = new GroovyClassLoader(loader); gloader.setShouldRecompile(true); for (ClasspathEntry entry : classpathList) { if (useSecurity) {