/** * Initialize on demand. * * @throws BuildException * if something goes wrong */ private void init() throws BuildException { if (runner != null) { return; } runner = helper.getScriptRunner(); }
/** * Initialize. * * @exception BuildException if something goes wrong */ private void init() throws BuildException { if (runner != null) { return; } runner = helper.getScriptRunner(); }
/** * Run the script using the helper object. * * @exception BuildException if something goes wrong with the build */ public void execute() throws BuildException { helper.getScriptRunner().executeScript("ANT"); }
/** * Initialize the script runner. Calls this before running the system */ protected void initScriptRunner() { if (runner != null) { return; } helper.setProjectComponent(this); runner = helper.getScriptRunner(); } /**
/** * Executes the script. * This is called by the script instance to execute the script for this * definition. * * @param attributes collection of attributes * @param elements a list of nested element values. * @param instance the script instance; can be null */ public void executeScript(Map<String, String> attributes, Map<String, List<Object>> elements, ScriptDefBase instance) { ScriptRunnerBase runner = helper.getScriptRunner(); runner.addBean("attributes", attributes); runner.addBean("elements", elements); runner.addBean("project", getProject()); if (instance != null) { runner.addBean("self", instance); } runner.executeScript("scriptdef_" + name); }