1 18 package org.apache.tools.ant.taskdefs.optional; 19 20 import java.io.File ; 21 import org.apache.tools.ant.BuildException; 22 import org.apache.tools.ant.Project; 23 import org.apache.tools.ant.Task; 24 import org.apache.tools.ant.util.ScriptRunnerHelper; 25 import org.apache.tools.ant.types.Path; 26 import org.apache.tools.ant.types.Reference; 27 28 33 public class Script extends Task { 34 35 private ScriptRunnerHelper helper = new ScriptRunnerHelper(); 36 37 41 public void setProject(Project project) { 42 super.setProject(project); 43 helper.setProjectComponent(this); 44 } 45 46 51 public void execute() throws BuildException { 52 helper.getScriptRunner().executeScript("ANT"); 53 } 54 55 60 public void setManager(String manager) { 61 helper.setManager(manager); 62 } 63 64 69 public void setLanguage(String language) { 70 helper.setLanguage(language); 71 } 72 73 78 public void setSrc(String fileName) { 79 helper.setSrc(new File (fileName)); 80 } 81 82 87 public void addText(String text) { 88 helper.addText(text); 89 } 90 91 96 public void setClasspath(Path classpath) { 97 helper.setClasspath(classpath); 98 } 99 100 105 public Path createClasspath() { 106 return helper.createClasspath(); 107 } 108 109 115 public void setClasspathRef(Reference r) { 116 helper.setClasspathRef(r); 117 } 118 119 129 public void setSetBeans(boolean setBeans) { 130 helper.setSetBeans(setBeans); 131 } 132 } 133 | Popular Tags |