Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 107272

Summary: Allow product configurations to be built by Ant scripts
Product: [Eclipse Project] PDE Reporter: Craig Setera <craigsfnet>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: alex.fitzpatrick, dsciamma, ed.burnette, gemma.cameron, jarek.przygodzki, jwiegman, pascal
Version: 3.1   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed patch
none
revised patch none

Description Craig Setera CLA 2005-08-17 17:45:35 EDT
The 3.1 product configuration stuff looks very nice/interesting.  Unfortunatley,
it does not appear to be Ant scriptable.  We would like to be able to take
advantage of the support, but must be able to embed the result into an automated
build.  Please consider adding Ant build script support around the product
configuration stuff.
Comment 1 Pascal Rapicault CLA 2005-11-11 14:19:38 EST
At pde build level, 3.1 is provided with a very basic support that allows to
brand from the product file, however it does not use generate the config.ini.
Comment 2 Andrew Niefer CLA 2006-02-07 11:00:41 EST
Created attachment 34267 [details]
proposed patch

Attached patch contains a new product builder.  Starting from a build.properties file that specifies a product file, it will generate a feature based on the product and build it.

run it by invoking the antrunner with something like the following arguments:
-buildfile C:/eclipse/plugins/org.eclipse.pde.build/scripts/productBuild/productBuild.xml -Dbuilder=C:/dev/Builder -DbuildDirectory=C:/dev/Builder/output

The productBuild.xml will generate a org.eclipse.pde.build.container.feature and then invoke the normal build.xml script (at ../build.xml)

This patch also includes a small refactoring of the customTargets.xml which adds an allElements.xml.  allElements.xml specifies the feature to build and the assemble targets, and customTargets.xml is only needed if the user has custom steps to perform.  The productBuild provides its own allElements.xml
Comment 3 Andrew Niefer CLA 2006-02-10 14:16:44 EST
Created attachment 34508 [details]
revised patch

Patch revised after review:
- Add verification of plugins/features to FeatureGenerator
- javadoc FeatureGeneratorTask
- pluginPath separated by File.pathSeparator and merged with workingDirectory for build site.
- error handling around ProductFiles
Comment 4 Pascal Rapicault CLA 2006-02-13 17:11:46 EST
Patch released in HEAD.
People can now use a script called productBuild.xml to build their products (they are still some glitches with the exe and the exe.ini file). The only parameter required is a specified version of build.properties provided in the templates folder.
Comment 5 Pascal Rapicault CLA 2006-02-16 13:44:29 EST
*** Bug 97835 has been marked as a duplicate of this bug. ***
Comment 6 Pascal Rapicault CLA 2006-03-02 10:36:36 EST
*** Bug 84065 has been marked as a duplicate of this bug. ***
Comment 7 Joel Wiegman CLA 2006-03-14 17:34:56 EST
I have a clarification question about this bug's resolution:

If my <product/> declaration in my .product file sets the attribute useFeatures="false", should I assume that I still can't automate the build of my RCP product to be built via Ant?  The productBuild.xml build script appears to assume you are using features in your product.
Comment 8 Gemma Cameron CLA 2006-03-15 08:43:22 EST
When and where can this patch be downloaded? I have a similar problem to bug 84065 in that I wish to automate building the .exe with my continuous build. What are these glitches with the exe and exe.ini mentioned?
Comment 9 Pascal Rapicault CLA 2006-03-15 09:06:25 EST
Joel, a feature is always generated for you from the content of the product file.
Gemma, the limitations around the exe and the ini have been fixed and should be available in this week I build.