1 18 19 29 30 package org.apache.tools.ant.taskdefs.optional.unix; 31 32 import java.io.File ; 33 34 import org.apache.tools.ant.BuildException; 35 import org.apache.tools.ant.taskdefs.condition.Os; 36 import org.apache.tools.ant.types.Commandline; 37 import org.apache.tools.ant.types.FileSet; 38 39 44 45 public abstract class AbstractAccessTask 46 extends org.apache.tools.ant.taskdefs.ExecuteOn { 47 48 51 public AbstractAccessTask() { 52 super.setParallel(true); 53 super.setSkipEmptyFilesets(true); 54 } 55 56 60 public void setFile(File src) { 61 FileSet fs = new FileSet(); 62 fs.setFile(src); 63 addFileset(fs); 64 } 65 66 72 public void setCommand(Commandline cmdl) { 73 throw new BuildException(getTaskType() 74 + " doesn\'t support the command attribute", 75 getLocation()); 76 } 77 78 84 public void setSkipEmptyFilesets(boolean skip) { 85 throw new BuildException(getTaskType() + " doesn\'t support the " 86 + "skipemptyfileset attribute", 87 getLocation()); 88 } 89 90 96 public void setAddsourcefile(boolean b) { 97 throw new BuildException(getTaskType() 98 + " doesn\'t support the addsourcefile attribute", getLocation()); 99 } 100 101 106 protected boolean isValidOs() { 107 return Os.isFamily("unix") && super.isValidOs(); 108 } 109 } 110 | Popular Tags |