1 11 package org.eclipse.pde.internal.build.packager; 12 13 import java.util.List ; 14 import org.eclipse.core.runtime.CoreException; 15 import org.eclipse.pde.internal.build.*; 16 import org.eclipse.pde.internal.build.BuildScriptGenerator; 17 import org.eclipse.pde.internal.build.Utils; 18 import org.eclipse.pde.internal.build.site.BuildTimeSiteFactory; 19 20 public class PackagerGenerator extends BuildScriptGenerator { 21 private String featureList = null; 22 private String propertyFile; 23 private boolean groupConfigs; 24 25 public PackagerGenerator() { 26 generateBuildScript = false; 27 children = true; 28 groupConfigs = false; 29 } 30 31 public void setFeatureList(String features) { 32 featureList = features; 33 } 34 35 protected void sortElements(List features, List plugins) { 36 String [] allFeatures = Utils.getArrayFromString(featureList); 37 for (int i = 0; i < allFeatures.length; i++) { 38 features.add(allFeatures[i]); 39 } 40 } 41 42 protected void generatePackageScripts(AssemblyInformation assemblageInformation, String [] featureInfo, BuildTimeSiteFactory factory) throws CoreException { 43 PackageScriptGenerator assembler = null; 44 if (groupConfigs) 45 assembler = new DeltaPackScriptGenerator(workingDirectory, assemblageInformation, featureInfo[0]); 46 else 47 assembler = new PackageScriptGenerator(workingDirectory, assemblageInformation, featureInfo[0]); 48 49 assembler.setSignJars(signJars); 50 assembler.setGenerateJnlp(generateJnlp); 51 assembler.setArchivesFormat(getArchivesFormat()); 52 assembler.setPropertyFile(propertyFile); 53 assembler.setBackwardCompatibleName(true); 54 assembler.setBuildSiteFactory(factory); 55 assembler.generate(); 56 } 57 58 public void setPropertyFile(String propertyFile) { 59 this.propertyFile = propertyFile; 60 } 61 62 public void groupConfigs(boolean value) { 63 groupConfigs = value; 64 } 65 } 66 | Popular Tags |