1 11 package org.eclipse.pde.internal.build.tasks; 12 13 import java.net.MalformedURLException ; 14 import org.apache.tools.ant.BuildException; 15 import org.apache.tools.ant.Task; 16 import org.eclipse.core.runtime.CoreException; 17 import org.eclipse.pde.internal.build.AbstractScriptGenerator; 18 import org.eclipse.pde.internal.build.Utils; 19 import org.eclipse.pde.internal.build.packager.PackagerBuildScriptGenerator; 20 21 26 public class AssemblerTask extends Task { 27 28 protected PackagerBuildScriptGenerator generator; 29 30 { 31 generator = new PackagerBuildScriptGenerator(); 32 generator.setGenerateIncludedFeatures(true); 33 generator.setAnalyseChildren(true); 34 generator.setSourceFeatureGeneration(false); 35 generator.setBinaryFeatureGeneration(true); 36 generator.setScriptGeneration(false); 37 } 38 39 44 public void setWorkingDirectory(String workingLocation) throws MalformedURLException { 45 generator.setWorkingDirectory(workingLocation); 46 } 47 48 52 public void setFeatureList(String featureList) throws BuildException { 53 generator.setFeatureList(featureList); 54 } 55 56 61 public void setConfigInfo(String configInfo) throws CoreException { 62 AbstractScriptGenerator.setConfigInfo(configInfo); 63 } 64 65 69 public void setBaseLocation(String baseLocation) throws BuildException { 70 String [] locations = Utils.getArrayFromString(baseLocation); 71 generator.setPluginPath(locations); 72 } 73 74 public void execute() throws BuildException { 75 try { 76 generator.run(); 77 } catch (CoreException e) { 78 throw new BuildException(e); 79 } 80 } 81 82 86 public void setPackagePropertyFile(String propertyFile) { 87 generator.setPropertyFile(propertyFile); 88 } 89 } | Popular Tags |