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.AbstractScriptGenerator; 17 import org.eclipse.pde.internal.build.BundleHelper; 18 import org.eclipse.pde.internal.build.packager.FetchFileGenerator; 19 20 25 public class FetchFileGeneratorTask extends Task { 26 protected FetchFileGenerator fileFetcher = new FetchFileGenerator(); 27 28 29 33 public void setWorkingDirectory(String workingDirectory) { 34 fileFetcher.setWorkingDirectory(workingDirectory); 35 } 36 37 42 public void setConfigInfo(String config) throws CoreException { 43 AbstractScriptGenerator.setConfigInfo(config); 44 } 45 46 50 public void setContentFilter(String filter) { 51 fileFetcher.setContentFilter(filter); 52 } 53 54 58 public void setComponentFilter(String components) { 59 fileFetcher.setComponentFilter(components); 60 } 61 62 66 public void setMap(String mapLocation) { 67 fileFetcher.setMapLocation(mapLocation); 68 } 69 70 public void execute() throws BuildException { 71 try { 72 BundleHelper.getDefault().setLog(this); 73 fileFetcher.generate(); 74 BundleHelper.getDefault().setLog(null); 75 } catch (CoreException e) { 76 throw new BuildException(TaskHelper.statusToString(e.getStatus(), null).toString()); 77 } 78 } 79 } 80 | Popular Tags |