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 125463 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
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
initial patch
264603.txt (text/plain), 15.06 KB, created by
Andrew Niefer
on 2009-02-11 17:27:46 EST
(
hide
)
Description:
initial patch
Filename:
MIME Type:
Creator:
Andrew Niefer
Created:
2009-02-11 17:27:46 EST
Size:
15.06 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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 11 Feb 2009 22:27:07 -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/P2ConfigScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java,v >retrieving revision 1.1 >diff -u -r1.1 P2ConfigScriptGenerator.java >--- src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java 6 Feb 2009 22:11:37 -0000 1.1 >+++ src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java 11 Feb 2009 22:27:07 -0000 >@@ -71,8 +71,8 @@ > if (product != null) { > script.printProperty(PROPERTY_LAUNCHER_NAME, product.getLauncherName()); > script.printProperty(PROPERTY_LAUNCHER_PROVIDER, FEATURE_EQUINOX_EXECUTABLE); >- script.printProperty(PROPERTY_P2_BUILD_REPO, "file:" + Utils.getPropertyFormat(PROPERTY_BUILD_DIRECTORY) + "/buildRepo"); //$NON-NLS-1$ //$NON-NLS-2$ > } >+ script.printProperty(PROPERTY_P2_BUILD_REPO, "file:" + Utils.getPropertyFormat(PROPERTY_BUILD_DIRECTORY) + "/buildRepo"); //$NON-NLS-1$ //$NON-NLS-2$ > script.printProperty(PROPERTY_ASSEMBLY_TMP, Utils.getPropertyFormat(PROPERTY_BUILD_DIRECTORY) + "/tmp"); //$NON-NLS-1$ > script.println(); > generateCustomGatherMacro(); >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 11 Feb 2009 22:27:07 -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/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 11 Feb 2009 22:27:07 -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/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 11 Feb 2009 22:27:07 -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,6 +145,19 @@ > script.println(); > } > >+ protected void generateDirectorCall() { >+ 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(); >+ } >+ > private void generateProcessingCalls() { > script.printAntCallTask(TARGET_JAR_PROCESSING, true, null); > script.println(); >@@ -334,6 +353,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 +366,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$ >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 11 Feb 2009 22:27:07 -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 11 Feb 2009 22:27:07 -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> >#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 11 Feb 2009 22:27:08 -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])) {
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