1 18 19 29 30 package org.apache.tools.ant.taskdefs.optional.unix; 31 32 import org.apache.tools.ant.BuildException; 33 34 41 public class Chgrp extends AbstractAccessTask { 42 43 private boolean haveGroup = false; 44 45 48 public Chgrp() { 49 super.setExecutable("chgrp"); 50 } 51 52 57 public void setGroup(String group) { 58 createArg().setValue(group); 59 haveGroup = true; 60 } 61 62 66 protected void checkConfiguration() { 67 if (!haveGroup) { 68 throw new BuildException("Required attribute group not set in " 69 + "chgrp", getLocation()); 70 } 71 super.checkConfiguration(); 72 } 73 74 79 public void setExecutable(String e) { 80 throw new BuildException(getTaskType() 81 + " doesn\'t support the executable" 82 + " attribute", getLocation()); 83 } 84 } 85 | Popular Tags |