View | Details | Raw Unified | Return to bug 338878 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java (+11 lines)
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM - Initial API and implementation
9
 *     IBM - Initial API and implementation
10
 *     Compuware Corporation - Sebastien Angers <sebastien.angers@compuware.com> 
11
 *     		- Enabled additional mirror slicingOptions in Headless PDE Build
12
 *     		- https://bugs.eclipse.org/338878
10
 *******************************************************************************/
13
 *******************************************************************************/
11
package org.eclipse.pde.internal.build;
14
package org.eclipse.pde.internal.build;
12
15
Lines 104-109 Link Here
104
	public static final String PROPERTY_P2_METADATA_REPO_NAME = "p2.metadata.repo.name"; //$NON-NLS-1$
107
	public static final String PROPERTY_P2_METADATA_REPO_NAME = "p2.metadata.repo.name"; //$NON-NLS-1$
105
	public static final String PROPERTY_P2_ARTIFACT_REPO_NAME = "p2.artifact.repo.name"; //$NON-NLS-1$
108
	public static final String PROPERTY_P2_ARTIFACT_REPO_NAME = "p2.artifact.repo.name"; //$NON-NLS-1$
106
	public static final String PROPERTY_P2_GATHERING = "p2.gathering"; //$NON-NLS-1$
109
	public static final String PROPERTY_P2_GATHERING = "p2.gathering"; //$NON-NLS-1$
110
	public static final String PROPERTY_P2_MIRROR_SLICING_FILTER = "p2.mirror.slicing.filter"; //$NON-NLS-1$
111
	public static final String PROPERTY_P2_MIRROR_SLICING_FOLLOW_ONLY_FILTERED_REQS = "p2.mirror.slicing.followOnlyFilteredRequirements"; //$NON-NLS-1$
112
	public static final String PROPERTY_P2_MIRROR_SLICING_FOLLOW_STRICT = "p2.mirror.slicing.followStrict"; //$NON-NLS-1$
113
	public static final String PROPERTY_P2_MIRROR_SLICING_INCLUDE_FEATURES = "p2.mirror.slicing.includeFeatures"; //$NON-NLS-1$
114
	public static final String PROPERTY_P2_MIRROR_SLICING_INCLUDE_NON_GREEDY = "p2.mirror.slicing.includeNonGreedy"; //$NON-NLS-1$
115
	public static final String PROPERTY_P2_MIRROR_SLICING_INCLUDE_OPTIONAL = "p2.mirror.slicing.includeOptional"; //$NON-NLS-1$
116
	public static final String PROPERTY_P2_MIRROR_SLICING_LATEST_VERSION_ONLY = "p2.mirror.slicing.latestVersionOnly"; //$NON-NLS-1$
117
	public static final String PROPERTY_P2_MIRROR_SLICING_PLATFORM_FILTER = "p2.mirror.slicing.platformFilter"; //$NON-NLS-1$
107
	public static final String PROPERTY_SKIP_MIRRORING = "skipMirroring"; //$NON-NLS-1$
118
	public static final String PROPERTY_SKIP_MIRRORING = "skipMirroring"; //$NON-NLS-1$
108
	public static final String PROPERTY_SKIP_DIRECTOR = "skipDirector"; //$NON-NLS-1$
119
	public static final String PROPERTY_SKIP_DIRECTOR = "skipDirector"; //$NON-NLS-1$
109
120
(-)src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java (-1 / +37 lines)
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Compuware Corporation - Sebastien Angers <sebastien.angers@compuware.com> 
11
 *     		- Enabled additional mirror slicingOptions in Headless PDE Build
12
 *     		- https://bugs.eclipse.org/338878
10
 *******************************************************************************/
13
 *******************************************************************************/
11
14
12
package org.eclipse.pde.internal.build;
15
package org.eclipse.pde.internal.build;
Lines 300-306 Link Here
300
		script.printStartTag("p2.mirror"); //$NON-NLS-1$
303
		script.printStartTag("p2.mirror"); //$NON-NLS-1$
301
		script.printTab();
304
		script.printTab();
302
		script.print("\t<slicingOptions"); //$NON-NLS-1$
305
		script.print("\t<slicingOptions"); //$NON-NLS-1$
303
		script.printAttribute("includeNonGreedy", FALSE, true); //$NON-NLS-1$
306
307
		if (havePDEUIState()) {
308
			// since the GUI does not provide ability to set slicingOptions, setting most common ones
309
			script.printAttribute("includeNonGreedy", FALSE, true); //$NON-NLS-1$
310
			script.printAttribute("includeOptional", FALSE, true); //$NON-NLS-1$
311
		} else {
312
			// headless PDE Build mode
313
			// note that if a slicingOption has not been set in the build.properties,
314
			// a default value will be set here
315
			String filter = AbstractScriptGenerator.getImmutableAntProperty(PROPERTY_P2_MIRROR_SLICING_FILTER);
316
			script.printAttribute("filter", filter != null ? Utils.getPropertyFormat(PROPERTY_P2_MIRROR_SLICING_FILTER) : "", true); //$NON-NLS-1$
317
318
			String followOnlyFilteredRequirements = AbstractScriptGenerator.getImmutableAntProperty(PROPERTY_P2_MIRROR_SLICING_FOLLOW_ONLY_FILTERED_REQS);
319
			script.printAttribute("followOnlyFilteredRequirements", followOnlyFilteredRequirements != null ? Utils.getPropertyFormat(PROPERTY_P2_MIRROR_SLICING_FOLLOW_ONLY_FILTERED_REQS) : "false", true); //$NON-NLS-1$
320
321
			String followStrict = AbstractScriptGenerator.getImmutableAntProperty(PROPERTY_P2_MIRROR_SLICING_FOLLOW_STRICT);
322
			script.printAttribute("followStrict", followStrict != null ? Utils.getPropertyFormat(PROPERTY_P2_MIRROR_SLICING_FOLLOW_STRICT) : "false", true); //$NON-NLS-1$
323
324
			String includeFeatures = AbstractScriptGenerator.getImmutableAntProperty(PROPERTY_P2_MIRROR_SLICING_INCLUDE_FEATURES);
325
			script.printAttribute("includeFeatures", includeFeatures != null ? Utils.getPropertyFormat(PROPERTY_P2_MIRROR_SLICING_INCLUDE_FEATURES) : "true", true); //$NON-NLS-1$
326
327
			String includeNonGreedy = AbstractScriptGenerator.getImmutableAntProperty(PROPERTY_P2_MIRROR_SLICING_INCLUDE_NON_GREEDY);
328
			script.printAttribute("includeNonGreedy", includeNonGreedy != null ? Utils.getPropertyFormat(PROPERTY_P2_MIRROR_SLICING_INCLUDE_NON_GREEDY) : "false", true); //$NON-NLS-1$
329
330
			String includeOptional = AbstractScriptGenerator.getImmutableAntProperty(PROPERTY_P2_MIRROR_SLICING_INCLUDE_OPTIONAL);
331
			script.printAttribute("includeOptional", includeOptional != null ? Utils.getPropertyFormat(PROPERTY_P2_MIRROR_SLICING_INCLUDE_OPTIONAL) : "false", true); //$NON-NLS-1$
332
333
			String latestVersionOnly = AbstractScriptGenerator.getImmutableAntProperty(PROPERTY_P2_MIRROR_SLICING_LATEST_VERSION_ONLY);
334
			script.printAttribute("latestVersionOnly", latestVersionOnly != null ? Utils.getPropertyFormat(PROPERTY_P2_MIRROR_SLICING_LATEST_VERSION_ONLY) : "false", true); //$NON-NLS-1$
335
336
			String platformFilter = AbstractScriptGenerator.getImmutableAntProperty(PROPERTY_P2_MIRROR_SLICING_PLATFORM_FILTER);
337
			script.printAttribute("platformFilter", platformFilter != null ? Utils.getPropertyFormat(PROPERTY_P2_MIRROR_SLICING_PLATFORM_FILTER) : "", true); //$NON-NLS-1$			
338
		}
339
304
		script.println("/>"); //$NON-NLS-1$
340
		script.println("/>"); //$NON-NLS-1$
305
341
306
		script.printTab();
342
		script.printTab();
(-)src_ant/org/eclipse/pde/internal/build/tasks/BuildScriptGeneratorTask.java (+35 lines)
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Compuware Corporation - Sebastien Angers <sebastien.angers@compuware.com> 
11
 *     		- Enabled additional mirror slicingOptions in Headless PDE Build
12
 *     		- https://bugs.eclipse.org/338878
10
 *******************************************************************************/
13
 *******************************************************************************/
11
package org.eclipse.pde.internal.build.tasks;
14
package org.eclipse.pde.internal.build.tasks;
12
15
Lines 124-129 Link Here
124
		if (Boolean.valueOf(value).booleanValue())
127
		if (Boolean.valueOf(value).booleanValue())
125
			properties.put(IBuildPropertiesConstants.PROPERTY_P2_GATHERING, "true"); //$NON-NLS-1$ 
128
			properties.put(IBuildPropertiesConstants.PROPERTY_P2_GATHERING, "true"); //$NON-NLS-1$ 
126
129
130
		value = getProject().getProperty(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_FILTER);
131
		if (value != null)
132
			properties.put(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_FILTER, value);
133
134
		value = getProject().getProperty(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_FOLLOW_ONLY_FILTERED_REQS);
135
		if (value != null)
136
			properties.put(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_FOLLOW_ONLY_FILTERED_REQS, value);
137
138
		value = getProject().getProperty(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_FOLLOW_STRICT);
139
		if (value != null)
140
			properties.put(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_FOLLOW_STRICT, value);
141
142
		value = getProject().getProperty(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_INCLUDE_FEATURES);
143
		if (value != null)
144
			properties.put(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_INCLUDE_FEATURES, value);
145
146
		value = getProject().getProperty(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_INCLUDE_NON_GREEDY);
147
		if (value != null)
148
			properties.put(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_INCLUDE_NON_GREEDY, value);
149
150
		value = getProject().getProperty(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_INCLUDE_OPTIONAL);
151
		if (value != null)
152
			properties.put(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_INCLUDE_OPTIONAL, value);
153
154
		value = getProject().getProperty(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_LATEST_VERSION_ONLY);
155
		if (value != null)
156
			properties.put(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_LATEST_VERSION_ONLY, value);
157
158
		value = getProject().getProperty(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_PLATFORM_FILTER);
159
		if (value != null)
160
			properties.put(IBuildPropertiesConstants.PROPERTY_P2_MIRROR_SLICING_PLATFORM_FILTER, value);
161
127
		value = getProject().getProperty(IBuildPropertiesConstants.PROPERTY_SUPPRESS_RESOLUTION_ERRORS);
162
		value = getProject().getProperty(IBuildPropertiesConstants.PROPERTY_SUPPRESS_RESOLUTION_ERRORS);
128
		if (Boolean.valueOf(value).booleanValue())
163
		if (Boolean.valueOf(value).booleanValue())
129
			properties.put(IBuildPropertiesConstants.PROPERTY_SUPPRESS_RESOLUTION_ERRORS, "true"); //$NON-NLS-1$ 
164
			properties.put(IBuildPropertiesConstants.PROPERTY_SUPPRESS_RESOLUTION_ERRORS, "true"); //$NON-NLS-1$ 
(-)templates/headless-build/build.properties (+17 lines)
Lines 7-12 Link Here
7
#
7
#
8
# Contributors:
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
9
#     IBM Corporation - initial API and implementation
10
#     Compuware Corporation - Sebastien Angers <sebastien.angers@compuware.com> 
11
#     	- Enabled additional mirror slicingOptions in Headless PDE Build
12
#     	- https://bugs.eclipse.org/338878
10
###############################################################################
13
###############################################################################
11
#####################
14
#####################
12
# Parameters describing how and where to execute the build.
15
# Parameters describing how and where to execute the build.
Lines 117-122 Link Here
117
#Control the creation of a file containing the version included in each configuration - on by default 
120
#Control the creation of a file containing the version included in each configuration - on by default 
118
#generateVersionsLists=false
121
#generateVersionsLists=false
119
122
123
############ REPO MIRROR SLICING CONTROL ############
124
125
# Default values for the slicingOptions of the p2.mirror Ant target used to generate the p2 repo (buildRepo)
126
# Note that the default values set here are different from the default values for p2.mirror's slicingOptions
127
# since they are specific to the PDE Build p2.mirror Ant target.
128
p2.mirror.slicing.filter=
129
p2.mirror.slicing.followOnlyFilteredRequirements=false
130
p2.mirror.slicing.followStrict=false
131
p2.mirror.slicing.includeFeatures=true
132
p2.mirror.slicing.includeNonGreedy=false
133
p2.mirror.slicing.includeOptional=false
134
p2.mirror.slicing.platformFilter=
135
p2.mirror.slicing.latestVersionOnly=false
136
120
############## SOURCE BUNDLE CONTROL ################
137
############## SOURCE BUNDLE CONTROL ################
121
# Set this property to have source bundles created and output into build repository.
138
# Set this property to have source bundles created and output into build repository.
122
# This does NOT put them in the build output (e.g., product) itself.
139
# This does NOT put them in the build output (e.g., product) itself.

Return to bug 338878