Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 125595 Details for
Bug 264603
Invoke the director to perform install during builds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
updated
264603.txt (text/plain), 27.25 KB, created by
Andrew Niefer
on 2009-02-12 19:07:22 EST
(
hide
)
Description:
updated
Filename:
MIME Type:
Creator:
Andrew Niefer
Created:
2009-02-12 19:07:22 EST
Size:
27.25 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.director.app >Index: src/org/eclipse/equinox/internal/p2/director/app/Application.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java,v >retrieving revision 1.43 >diff -u -r1.43 Application.java >--- src/org/eclipse/equinox/internal/p2/director/app/Application.java 21 Jan 2009 19:51:47 -0000 1.43 >+++ src/org/eclipse/equinox/internal/p2/director/app/Application.java 13 Feb 2009 00:06:52 -0000 >@@ -38,10 +38,11 @@ > > public class Application implements IApplication { > private static final Integer EXIT_ERROR = new Integer(13); >- static private String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$ >- static private String EXEMPLARY_SETUP = "org.eclipse.equinox.p2.exemplarysetup"; //$NON-NLS-1$ >- static private String FRAMEWORKADMIN_EQUINOX = "org.eclipse.equinox.frameworkadmin.equinox"; //$NON-NLS-1$ >- static private String SIMPLE_CONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator"; //$NON-NLS-1$ >+ static private final String ANT_PROPERTY_PREFIX = "${"; //$NON-NLS-1$ >+ static private final String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$ >+ static private final String EXEMPLARY_SETUP = "org.eclipse.equinox.p2.exemplarysetup"; //$NON-NLS-1$ >+ static private final String FRAMEWORKADMIN_EQUINOX = "org.eclipse.equinox.frameworkadmin.equinox"; //$NON-NLS-1$ >+ static private final String SIMPLE_CONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator"; //$NON-NLS-1$ > > public static final int COMMAND_INSTALL = 0; > public static final int COMMAND_UNINSTALL = 1; >@@ -331,7 +332,8 @@ > } > > if (opt.equalsIgnoreCase("-version")) { //$NON-NLS-1$ >- version = new Version(arg); >+ if (arg != null && !arg.startsWith(ANT_PROPERTY_PREFIX)) >+ version = new Version(arg); > } > > if (opt.equalsIgnoreCase(COMMAND_NAMES[COMMAND_UNINSTALL])) { >#P org.eclipse.pde.build >Index: src/org/eclipse/pde/internal/build/IXMLConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IXMLConstants.java,v >retrieving revision 1.83 >diff -u -r1.83 IXMLConstants.java >--- src/org/eclipse/pde/internal/build/IXMLConstants.java 6 Feb 2009 22:11:37 -0000 1.83 >+++ src/org/eclipse/pde/internal/build/IXMLConstants.java 13 Feb 2009 00:06:54 -0000 >@@ -65,6 +65,8 @@ > public static final String TARGET_ROOT_TARGET = "rootTarget"; //$NON-NLS-1$ > public static final String TARGET_CUSTOM_ASSEMBLY = "customAssembly"; //$NON-NLS-1$ > public static final String TARGET_P2_METADATA = "generate.p2.metadata"; //$NON-NLS-1$ >+ public static final String TARGET_RUN_DIRECTOR = "runDirector"; //$NON-NLS-1$ >+ > // properties > public static final String PROPERTY_ARCH = "arch"; //$NON-NLS-1$ > public static final String PROPERTY_BASE_ARCH = "basearch"; //$NON-NLS-1$ >@@ -153,6 +155,7 @@ > public static final String PROPERTY_OMIT_ROOTFILES = "updateJar.omitRootfiles"; //$NON-NLS-1$ > public static final String PROPERTY_GENERATE_API_DESCRIPTION = "generateAPIDescription"; //$NON-NLS-1$ > public static final String PROPERTY_BINARY_FOLDERS = "binary.folders"; //$NON-NLS-1$ >+ public static final String PROPERTY_LAUNCHER_JAR = "equinoxLauncherJar"; //$NON-NLS-1$ > > //Jar processor properties > public static final String PROPERTY_SIGN_ALIAS = "sign.alias"; //$NON-NLS-1$ >Index: src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java,v >retrieving revision 1.36 >diff -u -r1.36 IBuildPropertiesConstants.java >--- src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java 6 Feb 2009 22:11:37 -0000 1.36 >+++ src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java 13 Feb 2009 00:06:54 -0000 >@@ -96,9 +96,15 @@ > public static final String PROPERTY_P2_COMPRESS = "p2.compress"; //$NON-NLS-1$ > public static final String PROPERTY_P2_METADATA_REPO_NAME = "p2.metadata.repo.name"; //$NON-NLS-1$ > public static final String PROPERTY_P2_ARTIFACT_REPO_NAME = "p2.artifact.repo.name"; //$NON-NLS-1$ >- public static final String PROPERTY_P2_BUILD_REPO = "p2.build.repo"; //$NON-NLS-1$ >+ > //Internal usage only >+ public static final String PROPERTY_P2_BUILD_REPO = "p2.build.repo"; //$NON-NLS-1$ > public static final String PROPERTY_P2_GENERATION_MODE = "p2.generation.mode"; //$NON-NLS-1$ >+ public static final String PROPERTY_P2_REPO = "p2.repo"; //$NON-NLS-1$ >+ public static final String PROPERTY_P2_DIRECTOR_IU = "p2.director.iu"; //$NON-NLS-1$ >+ public static final String PROPERTY_P2_DIRECTOR_VERSION = "p2.director.version"; //$NON-NLS-1$ >+ public static final String PROPERTY_P2_DIRECTOR_INSTALLPATH = "p2.director.installPath"; //$NON-NLS-1$ >+ > public static final String SOURCE_PLUGIN = "sourcePlugin"; //$NON-NLS-1$ > > public static final String PROPERTY_PACKAGER_MODE = "packagerMode"; //$NON-NLS-1$ >Index: src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java,v >retrieving revision 1.2 >diff -u -r1.2 P2ConfigScriptGenerator.java >--- src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java 12 Feb 2009 21:41:32 -0000 1.2 >+++ src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java 13 Feb 2009 00:06:54 -0000 >@@ -9,10 +9,15 @@ > > package org.eclipse.pde.internal.build; > >+import java.io.File; > import java.util.*; >-import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.*; > import org.eclipse.osgi.service.resolver.BundleDescription; >+import org.eclipse.pde.internal.build.ant.AntScript; >+import org.eclipse.pde.internal.build.ant.FileSet; > import org.eclipse.pde.internal.build.site.BuildTimeFeature; >+import org.eclipse.pde.internal.build.site.BuildTimeSite; >+import org.eclipse.pde.internal.build.site.compatibility.FeatureEntry; > > public class P2ConfigScriptGenerator extends AssembleConfigScriptGenerator { > private AssemblyInformation assemblyInformation = null; >@@ -32,14 +37,14 @@ > initializeCollections(); > > try { >- openScript(directory, "assemble." + featureId + ".p2.xml"); //$NON-NLS-1$ //$NON-NLS-2$ >+ String prefix = assembling ? "assemble." : "package."; //$NON-NLS-1$ //$NON-NLS-2$ >+ openScript(directory, prefix + featureId + ".p2.xml"); //$NON-NLS-1$ > } catch (CoreException e) { > return; > } > generatePrologue(); > generateMainBegin(); > generateGatherCalls(); >- generateBrandingCalls(); > generateMetadataCalls(); > generateMainEnd(); > >@@ -110,24 +115,94 @@ > } > } > script.printDeleteTask(Utils.getPropertyFormat(PROPERTY_ASSEMBLY_TMP) + "/p2.branding", null, null); //$NON-NLS-1$ >+ script.println(); > } > > protected void generateMetadataTarget() { >- script.printTargetDeclaration(TARGET_P2_METADATA, null, null, null, null); >+ script.printTargetDeclaration(TARGET_P2_METADATA, null, null, assembling ? PROPERTY_RUN_PACKAGER : null, null); >+ >+ generateBrandingCalls(); > > ProductFile product = getProductFile(); > if (product != null) { >+ >+ String productPath = product.getLocation(); >+ String productDir = getWorkingDirectory() + '/' + DEFAULT_FEATURE_LOCATION + '/' + CONTAINER_FEATURE + "/product"; //$NON-NLS-1$ >+ File productFile = new File(productPath); >+ String newProduct = new File(productDir, productFile.getName()).getAbsolutePath(); >+ script.printCopyFileTask(productPath, newProduct, true); >+ >+ File parent = new File(productPath).getParentFile(); >+ File p2Inf = new File(parent, "p2.inf"); //$NON-NLS-1$ >+ if (p2Inf.exists()) >+ script.printCopyTask(p2Inf.getAbsolutePath(), productDir, null, false, true); >+ generateProductReplaceTask(product, newProduct); >+ productPath = newProduct; >+ > script.printTab(); > script.print("<p2.publish.product "); //$NON-NLS-1$ > script.printAttribute("flavor", Utils.getPropertyFormat(PROPERTY_P2_FLAVOR), true); //$NON-NLS-1$ > script.printAttribute("repository", Utils.getPropertyFormat(PROPERTY_P2_BUILD_REPO), true); //$NON-NLS-1$ >- script.printAttribute("productFile", product.getLocation(), true); //$NON-NLS-1$ >+ script.printAttribute("productFile", newProduct, true); //$NON-NLS-1$ > script.println("/>"); //$NON-NLS-1$ > } > script.printTargetEnd(); > } > >+ //TODO this is duplicated from AssembleScriptGenerator >+ protected void generateProductReplaceTask(ProductFile product, String productDirectory) { >+ if (product == null) >+ return; >+ >+ BuildTimeSite site = null; >+ try { >+ site = getSite(false); >+ } catch (CoreException e1) { >+ return; >+ } >+ >+ List productEntries = product.getProductEntries(); >+ String mappings = Utils.getEntryVersionMappings((FeatureEntry[]) productEntries.toArray(new FeatureEntry[productEntries.size()]), site); >+ script.println("<eclipse.idReplacer productFilePath=\"" + AntScript.getEscaped(productDirectory) + "\""); //$NON-NLS-1$ //$NON-NLS-2$ >+ script.println(" selfVersion=\"" + product.getVersion() + "\" "); //$NON-NLS-1$ //$NON-NLS-2$ >+ if (product.useFeatures()) >+ script.println(" featureIds=\"" + mappings + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ >+ else >+ script.println(" pluginIds=\"" + mappings + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ >+ >+ return; >+ } >+ > protected void generateEpilogue() { > script.printProjectEnd(); > } >+ >+ protected void generateGatherBinPartsTarget() { >+ if (assembling) { >+ super.generateGatherBinPartsTarget(); >+ return; >+ } >+ >+ script.printTargetDeclaration(TARGET_GATHER_BIN_PARTS, null, null, null, null); >+ >+ ArrayList p2Features = new ArrayList(); >+ ArrayList p2Bundles = new ArrayList(); >+ for (int i = 0; i < plugins.length; i++) { >+ Path pluginLocation = new Path(plugins[i].getLocation()); >+ p2Bundles.add(new FileSet(pluginLocation.removeLastSegments(1).toOSString(), null, pluginLocation.lastSegment(), null, null, null, null)); >+ >+ } >+ >+ for (int i = 0; i < features.length; i++) { >+ IPath featureLocation = new Path(features[i].getURL().getPath()); >+ featureLocation = featureLocation.removeLastSegments(1); >+ p2Features.add(new FileSet(featureLocation.removeLastSegments(1).toOSString(), null, featureLocation.lastSegment(), null, null, null, null)); >+ } >+ >+ String repo = Utils.getPropertyFormat(PROPERTY_P2_BUILD_REPO); >+ script.printP2PublishFeaturesAndBundles(repo, repo, (FileSet[]) p2Bundles.toArray(new FileSet[p2Bundles.size()]), (FileSet[]) p2Features.toArray(new FileSet[p2Features.size()]), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_SITE)); >+ >+ script.printTargetEnd(); >+ script.println(); >+ } > } >Index: src/org/eclipse/pde/internal/build/IPDEBuildConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IPDEBuildConstants.java,v >retrieving revision 1.48 >diff -u -r1.48 IPDEBuildConstants.java >--- src/org/eclipse/pde/internal/build/IPDEBuildConstants.java 6 Feb 2009 22:11:37 -0000 1.48 >+++ src/org/eclipse/pde/internal/build/IPDEBuildConstants.java 13 Feb 2009 00:06:54 -0000 >@@ -39,6 +39,7 @@ > public final static String MANIFEST = "MANIFEST.MF"; //$NON-NLS-1$ > > // default values >+ public final static String PROPERTY_GENERIC_TARGETS = "genericTargets"; //$NON-NLS-1$ > public final static String DEFAULT_BUILD_SCRIPT_FILENAME = "build.xml"; //$NON-NLS-1$ > public final static String DEFAULT_FEATURE_LOCATION = "features"; //$NON-NLS-1$ > public final static String DEFAULT_FETCH_SCRIPT_FILENAME = "fetch.xml"; //$NON-NLS-1$ >Index: src/org/eclipse/pde/internal/build/AssembleScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssembleScriptGenerator.java,v >retrieving revision 1.37 >diff -u -r1.37 AssembleScriptGenerator.java >--- src/org/eclipse/pde/internal/build/AssembleScriptGenerator.java 6 Feb 2009 22:11:37 -0000 1.37 >+++ src/org/eclipse/pde/internal/build/AssembleScriptGenerator.java 13 Feb 2009 00:06:54 -0000 >@@ -110,7 +110,7 @@ > basicGenerateAssembleConfigFileTargetCall(current, configInfo[0], configInfo[1], configInfo[2], configInfo[3]); > } > } >- if (configScriptGenerator.haveP2Bundles()) >+ if (configScriptGenerator.haveP2Bundles() && !BuildDirector.p2Gathering) > script.printAntCallTask(TARGET_P2_METADATA, true, null); > script.printTargetEnd(); > } >@@ -125,6 +125,7 @@ > p2ConfigGenerator.initialize(directory, featureId); > p2ConfigGenerator.generate(); > >+ script.printTab(); > script.print("<assemble "); //$NON-NLS-1$ > script.printAttribute("config", "p2", true); //$NON-NLS-1$ //$NON-NLS-2$ > script.printAttribute("element", p2ConfigGenerator.getTargetElement(), true); //$NON-NLS-1$ >@@ -141,6 +142,7 @@ > configScriptGenerator.setGroupConfigs(groupConfigs); > configScriptGenerator.generate(); > >+ script.printTab(); > script.print("<assemble "); //$NON-NLS-1$ > String config = configScriptGenerator.getTargetConfig(); > script.printAttribute("config", config, true); //$NON-NLS-1$ >@@ -151,6 +153,8 @@ > } > > protected void generateMetadataTarget() { >+ if (BuildDirector.p2Gathering) >+ return; > if (configScriptGenerator.haveP2Bundles()) { > script.printTargetDeclaration(TARGET_P2_METADATA, null, TARGET_P2_METADATA, PROPERTY_RUN_PACKAGER, null); > >Index: src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java,v >retrieving revision 1.114 >diff -u -r1.114 AssembleConfigScriptGenerator.java >--- src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java 6 Feb 2009 22:11:37 -0000 1.114 >+++ src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java 13 Feb 2009 00:06:53 -0000 >@@ -11,6 +11,7 @@ > package org.eclipse.pde.internal.build; > > import java.io.File; >+import java.io.IOException; > import java.util.*; > import java.util.jar.JarFile; > import org.eclipse.core.runtime.*; >@@ -20,6 +21,7 @@ > import org.eclipse.pde.internal.build.builder.BuildDirector; > import org.eclipse.pde.internal.build.builder.ModelBuildScriptGenerator; > import org.eclipse.pde.internal.build.site.BuildTimeFeature; >+import org.osgi.framework.Bundle; > > /** > * Generate an assemble script for a given feature and a given config. It >@@ -119,10 +121,14 @@ > > generateMainBegin(); > generateInitializationSteps(); >- generateGatherCalls(); >- generateProcessingCalls(); >- generateBrandingCalls(); >- generateP2Steps(); >+ if (BuildDirector.p2Gathering) { >+ generateDirectorCall(); >+ } else { >+ generateGatherCalls(); >+ generateProcessingCalls(); >+ generateBrandingCalls(); >+ generateP2Steps(); >+ } > generateArchivingCalls(); > generateMainEnd(); > >@@ -139,14 +145,32 @@ > script.println(); > } > >+ protected void generateDirectorCall() { >+ script.printAntCallTask(TARGET_RUN_DIRECTOR, true, null); >+ } >+ >+ protected void generateDirectorTarget(boolean assembling) { >+ script.printTargetDeclaration(TARGET_RUN_DIRECTOR, null, null, assembling ? PROPERTY_RUN_PACKAGER : null, null); >+ Map parameters = new HashMap(); >+ parameters.put(PROPERTY_OS, Utils.getPropertyFormat(PROPERTY_OS)); >+ parameters.put(PROPERTY_WS, Utils.getPropertyFormat(PROPERTY_WS)); >+ parameters.put(PROPERTY_ARCH, Utils.getPropertyFormat(PROPERTY_ARCH)); >+ parameters.put(PROPERTY_P2_REPO, Utils.getPropertyFormat(PROPERTY_P2_BUILD_REPO)); >+ parameters.put(PROPERTY_P2_DIRECTOR_IU, productFile != null ? productFile.getId() : Utils.getPropertyFormat(PROPERTY_P2_ROOT_NAME)); >+ parameters.put(PROPERTY_P2_DIRECTOR_VERSION, productFile != null ? productFile.getVersion() : Utils.getPropertyFormat(PROPERTY_P2_ROOT_VERSION)); >+ parameters.put(PROPERTY_P2_DIRECTOR_INSTALLPATH, Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE)); >+ script.printAntTask(Utils.getPropertyFormat(PROPERTY_GENERIC_TARGETS), null, TARGET_RUN_DIRECTOR, null, TRUE, parameters); >+ script.println(); >+ script.printTargetEnd(); >+ } >+ > private void generateProcessingCalls() { > script.printAntCallTask(TARGET_JAR_PROCESSING, true, null); > script.println(); > } > > private void generateArchivingCalls() { >- if (!BuildDirector.p2Gathering) >- script.printAntCallTask(TARGET_ASSEMBLE_ARCHIVE, true, null); >+ script.printAntCallTask(TARGET_ASSEMBLE_ARCHIVE, true, null); > } > > protected void generateMainBegin() { >@@ -175,8 +199,8 @@ > script.println(); > } > >- private void generateArchivingTarget() { >- script.printTargetDeclaration(TARGET_ASSEMBLE_ARCHIVE, null, null, null, null); >+ protected void generateArchivingTarget(boolean assembling) { >+ script.printTargetDeclaration(TARGET_ASSEMBLE_ARCHIVE, null, null, assembling ? PROPERTY_RUN_PACKAGER : null, null); > Map properties = new HashMap(); > properties.put(PROPERTY_ROOT_FOLDER, rootFolder); > printCustomAssemblyAntCall(PROPERTY_PRE + "archive", properties); //$NON-NLS-1$ >@@ -334,6 +358,8 @@ > script.printProperty(PROPERTY_ECLIPSE_PLUGINS, Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE) + '/' + DEFAULT_PLUGIN_LOCATION); > script.printProperty(PROPERTY_ECLIPSE_FEATURES, Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE) + '/' + DEFAULT_FEATURE_LOCATION); > script.printProperty(PROPERTY_ARCHIVE_FULLPATH, Utils.getPropertyFormat(PROPERTY_BASEDIR) + '/' + Utils.getPropertyFormat(PROPERTY_BUILD_LABEL) + '/' + Utils.getPropertyFormat(PROPERTY_ARCHIVE_NAME)); >+ printLauncherJarProperty(); >+ script.printProperty(PROPERTY_P2_BUILD_REPO, "file:" + Utils.getPropertyFormat(PROPERTY_BUILD_DIRECTORY) + "/buildRepo"); //$NON-NLS-1$ //$NON-NLS-2$ > script.printAvailableTask(PROPERTY_CUSTOM_ASSEMBLY, "${builder}/customAssembly.xml", "${builder}/customAssembly.xml"); //$NON-NLS-1$ //$NON-NLS-2$ > > if (productFile != null && productFile.getLauncherName() != null) >@@ -345,6 +371,16 @@ > generatePackagingTargets(); > } > >+ protected void printLauncherJarProperty() { >+ Bundle launcherBundle = Platform.getBundle(BUNDLE_EQUINOX_LAUNCHER); >+ try { >+ File bundleFile = FileLocator.getBundleFile(launcherBundle); >+ script.printProperty(PROPERTY_LAUNCHER_JAR, bundleFile.getAbsolutePath()); >+ } catch (IOException e) { >+ // what can we do with this? >+ } >+ } >+ > protected void generateCustomGatherMacro() { > List attributes = new ArrayList(5); > attributes.add("dir"); //$NON-NLS-1$ >@@ -367,7 +403,7 @@ > script.println(); > } > >- private void printCustomGatherCall(String fullName, String dir, String propertyName, String propertyValue, String subFolder) { >+ protected void printCustomGatherCall(String fullName, String dir, String propertyName, String propertyValue, String subFolder) { > script.println("<" + PROPERTY_CUSTOM_GATHER + " dir=\"" + dir + "\" projectName=\"" + fullName + "\" propertyName=\"" + propertyName + "\" propertyValue=\"" + propertyValue + "\" subFolder=\"" + (subFolder != null ? subFolder : "") + "\" />"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ > } > >@@ -492,13 +528,14 @@ > if (embeddedSource) > generateGatherSourceTarget(); > generatePostProcessingTarget(); >- generateArchivingTarget(); >+ generateArchivingTarget(true); > > if (FORMAT_TAR.equalsIgnoreCase(archiveFormat)) > generateGZipTarget(true); > > generateCustomAssemblyTarget(); > generateMetadataTarget(); >+ generateDirectorTarget(true); > > script.printProjectEnd(); > script.close(); >Index: src/org/eclipse/pde/internal/build/ant/AntScript.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/AntScript.java,v >retrieving revision 1.60 >diff -u -r1.60 AntScript.java >--- src/org/eclipse/pde/internal/build/ant/AntScript.java 11 Feb 2009 22:59:03 -0000 1.60 >+++ src/org/eclipse/pde/internal/build/ant/AntScript.java 13 Feb 2009 00:06:54 -0000 >@@ -102,6 +102,7 @@ > bundles[i].printAs("bundles", this); //$NON-NLS-1$ > } > indent--; >+ printTab(); > output.println("</eclipse.publish.featuresAndBundles>"); //$NON-NLS-1$ > } > >Index: src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java,v >retrieving revision 1.26 >diff -u -r1.26 PackageScriptGenerator.java >--- src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java 6 Feb 2009 22:11:37 -0000 1.26 >+++ src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java 13 Feb 2009 00:06:54 -0000 >@@ -47,7 +47,18 @@ > } > > protected void generateP2ConfigFileTargetCall() { >- //empty >+ P2ConfigScriptGenerator p2ConfigGenerator = new P2ConfigScriptGenerator(assemblageInformation, false); >+ p2ConfigGenerator.setProduct(productLocation); >+ p2ConfigGenerator.initialize(directory, featureId); >+ p2ConfigGenerator.generate(); >+ >+ script.printTab(); >+ script.print("<assemble "); //$NON-NLS-1$ >+ script.printAttribute("config", "p2", true); //$NON-NLS-1$ //$NON-NLS-2$ >+ script.printAttribute("element", p2ConfigGenerator.getTargetElement(), true); //$NON-NLS-1$ >+ script.printAttribute("dot", ".", true); //$NON-NLS-1$ //$NON-NLS-2$ >+ script.printAttribute("scriptPrefix", "package", true); //$NON-NLS-1$ //$NON-NLS-2$ >+ script.println("/>"); //$NON-NLS-1$ > } > > protected void basicGenerateAssembleConfigFileTargetCall(Config aConfig, Collection binaryPlugins, Collection binaryFeatures, Collection allFeatures, Collection rootFiles) throws CoreException { >@@ -59,6 +70,7 @@ > configScriptGenerator.setBuildSiteFactory(siteFactory); > configScriptGenerator.generate(); > >+ script.printTab(); > script.print("<assemble "); //$NON-NLS-1$ > String config = configScriptGenerator.getTargetConfig(); > script.printAttribute("config", config, true); //$NON-NLS-1$ >Index: src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java,v >retrieving revision 1.23 >diff -u -r1.23 PackageConfigScriptGenerator.java >--- src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java 20 Jan 2009 22:27:33 -0000 1.23 >+++ src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java 13 Feb 2009 00:06:54 -0000 >@@ -183,6 +183,14 @@ > super.generateTarGZTasks(false); > } > >+ protected void generateDirectorTarget(boolean assembling) { >+ super.generateDirectorTarget(false); >+ } >+ >+ protected void generateArchivingTarget(boolean assembling) { >+ super.generateArchivingTarget(false); >+ } >+ > protected Object[] getFinalShape(BundleDescription bundle) { > if (AbstractScriptGenerator.getPropertyAsBoolean(IBuildPropertiesConstants.PROPERTY_PACKAGER_MODE) == true) { > String shape = isFolder(new Path(bundle.getLocation())) ? ShapeAdvisor.FOLDER : ShapeAdvisor.FILE; >Index: src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java,v >retrieving revision 1.126 >diff -u -r1.126 ModelBuildScriptGenerator.java >--- src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java 2 Feb 2009 16:55:33 -0000 1.126 >+++ src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java 13 Feb 2009 00:06:54 -0000 >@@ -607,8 +607,8 @@ > generateAPIToolsCall(getCompiledLocations(), Utils.isStringIn(splitIncludes, EXPANDED_DOT + '/') != -1, Utils.getPropertyFormat(PROPERTY_BUILD_RESULT_FOLDER)); > > script.println("<eclipse.gatherBundle "); //$NON-NLS-1$ >- script.println(" metadataRepository=\"file:${buildDirectory}/buildRepo\""); //$NON-NLS-1$ >- script.println(" artifactRepository=\"file:${buildDirectory}/buildRepo\""); //$NON-NLS-1$ >+ script.println(" metadataRepository=\"" + Utils.getPropertyFormat(PROPERTY_P2_BUILD_REPO) + "\""); //$NON-NLS-1$ //$NON-NLS-2$ >+ script.println(" artifactRepository=\"" + Utils.getPropertyFormat(PROPERTY_P2_BUILD_REPO) + "\""); //$NON-NLS-1$ //$NON-NLS-2$ > script.println(" buildResultFolder=\"" + Utils.getPropertyFormat(PROPERTY_BUILD_RESULT_FOLDER) + "\""); //$NON-NLS-1$ //$NON-NLS-2$ > script.println(" baseDirectory=\"${basedir}\""); //$NON-NLS-1$ > if (associatedEntry != null && associatedEntry.unpackSet()) >Index: scripts/genericTargets.xml >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/scripts/genericTargets.xml,v >retrieving revision 1.27 >diff -u -r1.27 genericTargets.xml >--- scripts/genericTargets.xml 23 Jan 2009 22:15:18 -0000 1.27 >+++ scripts/genericTargets.xml 13 Feb 2009 00:06:53 -0000 >@@ -200,4 +200,42 @@ > </p2.repo2runnable> > </target> > >+<!-- Invoke the p2 director to perform an install --> >+<target name="runDirector" > >+ <property name="p2.director.bundlepool" value="${p2.director.installPath}"/> >+ <property name="p2.director.dataArea" value="${p2.director.installPath}/p2"/> >+ <property name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" /> >+ <property name="p2.director.extraVMArgs" value="-Declipse.p2.MD5Check=false" /> >+ <property name="p2.director.profile" value="profile" /> >+ <property name="p2.director.version" value="" /> >+ <property name="p2.director.log" value="${basedir}/p2.director.log" /> >+ >+ <echo message="Invoking the p2 director with log file {p2.director.log}" /> >+ <java jar="${equinoxLauncherJar}" fork="true" failonerror="true"> >+ <arg line="-application org.eclipse.equinox.p2.director.app.application" /> >+ <arg line="-nosplash" /> >+ <arg line="--launcher.suppressErrors" /> >+ <arg line="-consoleLog" /> >+ <arg line="-flavor ${p2.flavor}" /> >+ <arg line="-installIU ${p2.director.iu}" /> >+ <arg line="-version ${p2.director.version}" /> >+ <arg line="-p2.os ${os}" /> >+ <arg line="-p2.ws ${ws}" /> >+ <arg line="-p2.arch ${arch}" /> >+ <arg line="-roaming" /> >+ <arg line="-profile ${p2.director.profile}" /> >+ <arg line="${p2.director.extraArgs}" /> >+ <arg line="-metadataRepository"/> >+ <arg value="${p2.repo}" /> >+ <arg line="-artifactRepository"/> >+ <arg value="${p2.repo}" /> >+ <arg line="-destination"/> >+ <arg value="${p2.director.installPath}" /> >+ <arg line="-bundlepool"/> >+ <arg value="${p2.director.bundlepool}" /> >+ <arg line="-vmargs" /> >+ <arg value="-Declipse.p2.data.area=${p2.director.dataArea}" /> >+ <arg line="${p2.director.extraVMArgs}" /> >+ </java> >+</target> > </project>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 264603
:
125463
|
125595
|
126224