1 11 package org.eclipse.pde.internal.build.tasks; 12 13 import org.apache.tools.ant.BuildException; 14 import org.eclipse.ant.core.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.UnzipperGenerator; 19 20 25 public class UnzipperGeneratorTask extends Task { 26 private UnzipperGenerator generator = new UnzipperGenerator(); 27 28 public void execute() throws BuildException { 29 try { 30 BundleHelper.getDefault().setLog(this); 31 generator.generate(); 32 BundleHelper.getDefault().setLog(null); 33 } catch (CoreException e) { 34 throw new BuildException(TaskHelper.statusToString(e.getStatus(), null).toString()); 35 } 36 } 37 38 42 public void setZipsDirectory(String filename) { 43 generator.setDirectoryLocation(filename); 44 } 45 46 50 public void setWorkingDirectory(String installLocation) { 51 generator.setWorkingDirectory(installLocation); 52 } 53 54 59 public void setConfigInfo(String configInfo) throws BuildException { 60 try { 61 AbstractScriptGenerator.setConfigInfo(configInfo); 62 } catch (CoreException e) { 63 throw new BuildException(e); 64 } 65 } 66 67 71 public void setPackagePropertyFile(String propertyFile) { 72 generator.setPropertyFile(propertyFile); 73 } 74 } 75 | Popular Tags |