1 17 package org.eclipse.emf.ant.taskdefs; 18 19 import java.io.File ; 20 21 import org.apache.tools.ant.BuildException; 22 23 import org.eclipse.emf.ant.util.Util; 24 25 26 47 public class RemoveVersionTask extends EMFTask 48 { 49 private File parentDir; 50 51 public void setParentDir(File dir) 52 { 53 parentDir = dir; 54 } 55 56 protected void checkAttributes() throws BuildException 57 { 58 assertTrue("The attribute 'parentDir' must indicate a valid directory.", parentDir != null && parentDir.isDirectory()); 59 assertTrue("You must have read and write access to " + parentDir.getAbsolutePath() + ".", parentDir.canRead() && parentDir.canWrite()); 60 } 61 62 protected void doExecute() throws Exception 63 { 64 Util.removeVersion(parentDir); 65 } 66 } | Popular Tags |