1 11 package org.eclipse.pde.internal.build.tasks; 12 13 import org.apache.tools.ant.BuildException; 14 import org.apache.tools.ant.Task; 15 import org.eclipse.core.runtime.CoreException; 16 import org.eclipse.pde.internal.build.*; 17 import org.eclipse.pde.internal.build.site.BuildTimeSiteFactory; 18 19 22 public class FetchTask extends Task { 23 24 27 protected FetchScriptGenerator generator; 28 29 32 public FetchTask() { 33 generator = new FetchScriptGenerator(); 34 } 35 36 44 public void setChildren(boolean children) { 45 generator.setFetchChildren(children); 46 } 47 48 52 public void setCvsPassFile(String cvsPassFileLocation) { 53 generator.setCvsPassFileLocation(cvsPassFileLocation); 54 } 55 56 60 public void setDirectory(String directoryLocation) { 61 generator.setDirectoryLocation(directoryLocation); 62 } 63 64 67 public void setElements(String element) { 68 generator.setElement(element); 69 } 70 71 76 public void setFetchTag(String value) { 77 generator.setFetchTagAsString(value); 78 } 79 80 85 public void setBuildDirectory(String buildDirectory) { 86 generator.setWorkingDirectory(buildDirectory); 87 } 88 89 94 public void setInstall(String installLocation) { 95 generator.setWorkingDirectory(installLocation); 96 } 97 98 public void execute() throws BuildException { 99 try { 100 BundleHelper.getDefault().setLog(this); 101 generator.generate(); 102 BundleHelper.getDefault().setLog(null); 103 } catch (CoreException e) { 104 throw new BuildException(TaskHelper.statusToString(e.getStatus(), null).toString()); 105 } 106 } 107 108 115 public void setRecursiveGeneration(boolean recursiveGeneration) { 116 generator.setRecursiveGeneration(recursiveGeneration); 117 } 118 119 125 public void setConfigInfo(String configInfo) throws CoreException { 126 AbstractScriptGenerator.setConfigInfo(configInfo); 127 } 128 129 134 public void setBaseLocation(String baseLocation) { 135 BuildTimeSiteFactory.setInstalledBaseSite(baseLocation); 136 } 137 } 138 | Popular Tags |