1402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<HTML>
2402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<HEAD>
3402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<TITLE>Automating Product Builds with PDE BUILD</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> 
4402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll</HEAD>
5402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll
6402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
7402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<P><FONT SIZE="+3"> Automating Builds with PDE BUILD</FONT><BR></P><P>Last Updated: 
8402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollJune16, 2005</P><P><FONT SIZE="+1"><A HREF="#intro">Introduction</A></FONT></P><P><FONT SIZE="+1"><A HREF="#preparation">Preparing 
9402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe infrastrucure</A></FONT></P><UL><LI><A HREF="#commit">Commit feature and plug-in 
10402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollprojects to CVS repository</A></LI><LI><A HREF="#createmap">Create map file project</A></LI><LI><A HREF="#gensource">Set 
11402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollup auto-generation of source features and plug-ins</A></LI></UL><P><FONT SIZE="+1"><A HREF="#buildconfigfiles">Preparing 
12402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollBuild Configuration Files</A> </FONT></P><UL> <LI><A HREF="#build.properties">Write 
13402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollbuild.properties</A></LI><LI><A HREF="#customTargets.xml">Write customTargets.xml</A></LI></UL><P><FONT SIZE="+1"><A HREF="#buildexec"> 
14402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollBuild Execution</A></FONT></P><UL> <LI><A HREF="#buildmachinesetup">Set up build 
15402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollmachine</A></LI><LI><A HREF="#runbuild">Running the build</A></LI></UL><P>&nbsp;</P><HR><P><FONT SIZE="+2"><B><A NAME="intro"></A>Introduction</B></FONT></P><P>This 
16402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldocument describes how to automate the building of Eclipse-based features and 
17402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltheir plug-ins using script generators in the org.eclipse.pde.build plug-in in 
18402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollEclipse 3.2 stream SDK.<BR> </P><P>Either an existing Eclipse 3.2 stream SDK or 
19402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe org.eclipse.releng.basebuilder project on dev.eclipse.org:/home/eclipse can 
20402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollbe used in this automated build process. The org.eclipse.releng.basebuilder project 
21402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollcontains the minimal set of plug-ins extracted from the latest stable Eclipse 
22402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll3.2 stream SDK build (a milestone or release) needed to run applications and custom 
23402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollAnt tasks in org.eclipse.ant.core, org.eclipse.pde.build, org.eclipse.pde, and 
24402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollorg.eclipse.help.base. This project is used by the Eclipse release engineering 
25402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollteam to build Eclipse itself. <P>It is assumed the reader is starting with a set 
26402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollof pre-existing features and plug-ins, their build.properties, and has a working 
27402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollknowledge of Apache Ant. In this document, features, plug-ins and fragments are 
28402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollalso referred to as &quot;elements&quot;. The word &quot;distribution&quot; is 
29402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollused to describe the end result of building a feature, a functional unit comprised 
30402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollof one or more groupings of plug-ins. The result of building a feature results 
31402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollin a zip or tar.gz file which contains the binary version of the feature and it's 
32402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollplug-ins. If the feature contains nested features (i.e. &lt;includes&gt; elements), 
33402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe nested features will be built recursively and included in the distribution.<br> 
34402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<br> For example, the Eclipse SDK distributions are built from the <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.sdk-feature/feature.xml?rev=1.7" target="extra">org.eclipse.sdk 
35402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfeature</a> which is comprised of features org.eclipse.rcp, org.eclipse.rcp.source, 
36402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollorg.eclipse.platform, org.eclipse.platform.source, org.eclipse.jdt, org.eclipse.jdt.source, 
37402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollorg.eclipse.pde, org.eclipse.pde.source and the org.eclipse.sdk plug-in. The distribution 
38402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollbuilt from the org.eclipse.sdk feature will therefore contain the binary version 
39402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollof the org.eclipse.sdk feature and its one plug-in plus the binary versions of 
40402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollits eight nested features and all their plug-ins.<br> <br> <HR><P><FONT SIZE="+2"><B><A NAME="preparation"></A>Preparing 
41402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe infrastructure</B></FONT></P><P><B><FONT SIZE="+1" COLOR="#000000"><A NAME="commit"></A>Commit 
42402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfeature and plug-in projects to CVS repository</FONT></B></P><P>Since Eclipse 
43402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll3.0, PDE Build allows a very flexible organization of feature, plug-in and fragment 
44402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollprojects in a CVS repository where:</P><UL> <LI> the directory containing the 
45402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollsource for an element can exist as a root level CVS module or in any subdirectory 
46402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollin the repository.</LI><LI>the directory name containing the element's source 
47402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldoes not have to match the id attribute in it's manifest (feature.xml, plugin.xml, 
48402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfragment.xml).</LI></UL><P>This flexibility was not present for the Eclipse process 
49402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollprior to version 3.0 which is one reason for the very flat organization of projects 
50402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollin the dev.eclipse.org:/home/eclipse repository. It is recommended that this flat 
51402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollstructure <B>not</B> be used as an example. Rather, using a structure similar 
52402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollto the one used for the <A HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/?cvsroot=Technology_Project" target="extra">Equinox</A> 
53402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollor <A HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.stellation/?cvsroot=Technology_Project" target="extra" >Stellation</A> 
54402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollproject should be considered where all files and directories for a given product 
55402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollare stored under a single directory or module at the cvs root level:<BR><BR>&lt;cvs 
56402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollroot&gt;<BR><BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/org.eclipse.equinox<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/plugins<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/all 
57402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollplug-ins at this level<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P><P>Once 
58402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe source for all elements is committed to a repository, the next step consists 
59402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollof recording the location and access method for each feature, plug-in and fragment 
60402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollin one or more <A HREF="#createmap">map files</A>.</P><P>&nbsp;</P><P><B><FONT SIZE="+1"><A NAME="createmap"></A>Create 
61402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollmap file project</FONT></B></P><P>A .map file is a java property file which contains 
62402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollmappings of elements to their CVS locations and access methods. Map files are 
63402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollused by PDE Build early in the build process to generate Ant scripts which use 
64402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe Ant &lt;cvs&gt; task to export source to a directory. This is described further 
65402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<A HREF="#getmaps">below</A>.<BR> <BR>Map file entries use the following format:<BR><BR> 
66402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<B>feature|fragment|plugin@element.Id=&lt;cvs tag&gt;,&lt;access method&gt;:&lt;cvs 
67402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molluser&gt;@&lt;cvs repository&gt;,&lt;cvs password&gt;[,&lt;repository path&gt; 
68402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll(no starting slash) ]</B><BR> </P><P>The &lt;repository path&gt; is only required 
69402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollwhen the module (or directory) containing the source for the element does not 
70402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollmatch the element.Id or if the directory is not at the root of the repository.<BR> 
71402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<BR>A map file entry must exist for each feature being built, it's &lt;plugin&gt; 
72402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollelements and it's &lt;includes&gt; elements (ie. nested features and their plug-ins). 
73402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollAdding a plug-in or fragment to a feature therefore requires updating the map 
74402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfiles with the new element.<BR><BR><BR><B>Map File Entry Examples</B></P><UL><LI>The 
75402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollorg.eclipse.platform plug-in source is located at the root of the <A HREF="http://dev.eclipse.org/viewcvs/" target="extra">dev.eclipse.org:/home/eclipse</A> 
76402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollrepository. It is contained in a directory with the name &quot;org.eclipse.platform&quot;. 
77402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollThe resulting map file entry for this plug-in is:<BR><BR>plugin@org.eclipse.platform=v20031121,:pserver:anonymous@dev.eclipse.org:/home/eclipse,<BR><BR></LI><LI>The 
78402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollorg.eclipse.platform feature source is located at the root of the <A HREF="http://dev.eclipse.org/viewcvs/" target="extra">dev.eclipse.org:/home/eclipse</A> 
79402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollrepository in a directory with the name &quot;org.eclipse.platform-feature&quot;. 
80402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollThe resulting map file entry for this feature is:<BR><BR>feature@org.eclipse.platform=v20031128,:pserver:anonymous@dev.eclipse.org:/home/eclipse,,org.eclipse.platform-feature<BR><BR></LI><LI>The 
81402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollorg.eclipse.gef.sdk feature source is located in directory in the <A HREF="http://dev.eclipse.org/viewcvs/?cvsroot=Tools_Project" target="extra">dev.eclipse.org:/home/tools</A> 
82402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollrepository in a subdirectory called &quot;org.eclipse.gef.sdk&quot; of &quot;org.eclipse-gef 
83402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfeature&quot;. The resulting map file entry for this feature is:<BR><BR>feature@org.eclipse.gef.sdk=I_20031117, 
84402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll:pserver:anonymous@dev.eclipse.org:/home/tools,,org.eclipse.gef-feature/org.eclipse.gef.sdk<BR></LI></UL><P>One 
85402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollor more map files can be used to list the elements. The map files can be kept 
86402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollunder version control. Some examples of map file projects include <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/">org.eclipse.releng</A>, 
87402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gef.releng/?cvsroot=Tools_Project">org.eclipse.gef.releng</A>, 
88402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.releng/?cvsroot=Tools_Project">org.eclipse.ve.releng</A>.<BR> 
89402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<BR></P><P><B><FONT SIZE="+1"><A NAME="gensource"></A>Generating source features 
90402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland plug-ins at build time</FONT></B></P><P>Source features and plug-ins can be 
91402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollgenerated at build time by PDE Build. Source features and associated source plug-ins 
92402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollare typically generated for a development kit distributions (i.e. SDK). It is 
93402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollalso possible to generate a source plug-in only. This is typically the case for 
94402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollexample features or JUnit testing features.<BR> <BR>To generate a <B>source feature 
95402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland associated source plug-in</B> at build time, you will need to do the following:</P><OL> 
96402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<LI> Add an entry to the build.properties file in the feature project for which 
97402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollyou wish to include the source feature and plug-in. The generated source feature 
98402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollshould also be listed in the feature.xml as an &lt;includes&gt; element.<BR> <BR> 
99402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollThe build.properties entry should use the following format:<BR> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generate.feature@&lt;source.feature.id 
100402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollto generate&gt;=&lt;feature.id from which to which to collect source&gt;, plugin@&lt;plugin.id&gt;<BR> 
101402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<BR> Example taken from <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.sdk-feature/build.properties?rev=1.4">org.eclipse.sdk-feature/build.properties</A>: 
102402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generate.feature@org.eclipse.jdt.source=org.eclipse.jdt, 
103402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollplugin@org.eclipse.jdt.doc.isv<BR> <BR> In this example, a source feature and 
104402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molla plug-in, both with id &quot;org.eclipse.jdt.source&quot; will be generated and 
105402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollwill contain source from plug-ins listed in the org.eclipse.jdt feature and will 
106402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollalso include the plug-in org.eclipse.jdt.doc.isv. The generated org.eclipse.jdt.source 
107402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollplug-in will be automatically listed in the org.eclipse.jdt.source feature.xml. 
108402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<BR> <BR> <BR> </LI><LI>In the feature project from which the source feature will 
109402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollbe generated, a directory called &quot;<B>sourceTemplateFeature</B>&quot; and 
110402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molla directory called &quot;<B>sourceTemplatePlugin</B>&quot; will be required. These 
111402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldirectories should contain the files that are included in the root of the generated 
112402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollsource feature and plug-in. The feature.xml and plugin.xml files are not required 
113402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollsince these are generated. A build.properties is required in the sourceTemplatePlugin 
114402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldirectory. This should contain a &quot;bin.includes&quot; setting as well as the 
115402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollentry &quot;sourcePlugin = true&quot;. The plugin.xml file and src/ directory 
116402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollshould be listed in the bin.includes.<BR> <BR> See <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt-feature/">org.eclipse.jdt-feature</A> 
117402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.platform-feature/">org.eclipse.platform-feature</A> 
118402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfor examples.<BR> <BR> </LI></OL><P>To generate a <B>source plug-in only</B> at 
119402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollbuild time, you will need to do the following:</P><OL> <LI> Add an entry to the 
120402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollbuild.properties file in the feature project for which you wish to include the 
121402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollsource plug-in. The generated source plug-in should also be listed in the feature.xml 
122402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollas a &lt;plugin&gt; element.. <BR> <BR> The build.properties entry should use 
123402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe following format:<BR> <BR> generate.plugin@&lt;source.plugin.id to generate&gt;=&lt;feature.id 
124402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfrom which to which to collect source&gt;, plugin@&lt;plugin.id&gt;<BR> <BR> Example 
125402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltaken from <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.ve.tests-feature/build.properties?rev=1.2&cvsroot=Tools_Project">org.eclipse.ve.tests-feature/build.properties</A>: 
126402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generate.plugin@org.eclipse.ve.tests.source=org.eclipse.ve.tests<BR> 
127402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<BR> <BR> </LI><LI>In the runtime feature project from which the source plug-in 
128402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollwill be generated, create a directory called &quot;sourceTemplatePlugin&quot; 
129402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollwhich must contain a build.properties with a &quot;bin.includes&quot; setting 
130402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland &quot;sourcePlugin=true&quot;. The plugin.xml file and src/ directory should 
131402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollbe listed in the bin.includes.<BR> <BR> See <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.examples-feature/sourceTemplatePlugin/?cvsroot=Tools_Project">org.eclipse.ve.examples-feature/sourceTemplatePlugin</A> 
132402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfor an example.<BR> </LI></OL><HR><P><FONT SIZE="+2"><A NAME="buildconfigfiles"></A><B>Preparing 
133402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollBuild Configuration Files</B></FONT></P><P>The distilled build process consists 
134402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollof the following four steps:</P><OL><LI>build environment setup</LI><LI>check 
135402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollout source from one or more CVS repositories</LI><LI>compilation</LI><LI> assembly 
136402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollof distribution<BR></LI></OL><P>The script which controls the build sequence is 
137402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe build.xml Ant script in org.eclipse.pde.build. However this script requires 
138402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltwo user-implemented build configuration files,<A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.pde.build/templates/build.properties?rev=HEAD&content-type=text/vnd.viewcvs-markup">build.properties</A> 
139402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.pde.build/templates/customTargets.xml?rev=HEAD&content-type=text/vnd.viewcvs-markup">customTargets.xml</A>. 
140402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollThese two files provide the information on the &quot;where and how&quot; to build 
141402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollspecific elements. </P><P>Templates of these files are provided in the <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.pde.build/templates/">org.eclipse.pde.build/templates</A> 
142402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldirectory and examples are available in <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng.eclipsebuilder/">org.eclipse.releng.eclipsebuilder</A>, 
143402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng.gefbuilder/?cvsroot=Tools_Project">org.eclipse.releng.gefbuilder</A> 
144402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.releng.builder/?cvsroot=Tools_Project">org.eclipse.ve.releng.builder</A> 
145402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfor building Eclipse, GEF and VE runtimes, respectively.</P><P><B><FONT SIZE="+1"><A NAME="build.properties"></A>build.properties</FONT></B></P><P>The 
146402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollbuild.properties file defines a number of properties that are used as Ant properties 
147402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollat build time and as arguments to script generators in org.eclipse.pde.build to 
148402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldescribe how and where to execute the build. The values for properties listed 
149402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollin this file override any values set in the generated build.xml files. See &quot;Generating 
150402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollAnt scripts from the command line&quot; in the PDE Guide in Eclipse 3.2 stream 
151402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollHelp for a description of required and optional properties.</P><P><B><FONT SIZE="+1"><A NAME="customTargets.xml"></A>customTargets.xml</FONT></B></P><P>customTargets.xml 
152402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollis an Ant script containing targets called by PDE Build scripts to provide the 
153402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfollowing information:</P><OL><LI>the list of elements for which to generate scripts</LI><LI>instruction 
154402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollon retrieval of map file projects</LI><LI>steps to execute before and after the 
155402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfollowing: retrieving map files, checking out source, generating build.xml scripts, 
156402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollexecuting build.xml scripts, and assembling the binary distributions.</LI><LI>instruction 
157402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollon things to do after the build is done.</LI></OL><P>The table below lists the 
158402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltargets that are used to provide this information.<BR><BR></P><TABLE WIDTH="100%" BORDER="1"><TR><TD WIDTH="24%">Target</TD><TD WIDTH="76%">Description</TD></TR><TR><TD WIDTH="24%">allElements</TD><TD WIDTH="76%"><P>This 
159402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltarget lists all features that will be packaged into a binary distribution where 
160402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molleach listing comes in the form of an &lt;ant&gt; call to org.eclipse.pde.build/scripts/genericTargets.xml:<BR><BR><B>&lt;ant 
161402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollantfile=&quot;${genericTargets}&quot; target=&quot;${target}&quot; &gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;property 
162402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;type&quot; value=&quot;feature&quot; /&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;property 
163402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;id&quot; value=&quot;&lt;element.id&gt;&quot; /&gt;<BR> &lt;/ant&gt;<BR></B><BR> 
164402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollThe user is only required to specify a value for properties &quot;type&quot; and 
165402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollid (the value for the id attribute in the feature.xml) for each listing. At this 
166402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltime, only the type &quot;feature&quot; is supported.<BR></P><P>Example from <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.releng.eclipsebuilder/jdt/customTargets.xml?rev=HEAD&content-type=text/xml">org.eclipse.releng.eclipsebuilder/jdt/customTargets.xml</A>:</P><P><B>&lt;target 
167402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;allElements&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ant antfile=&quot;${genericTargets}&quot; 
168402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltarget=&quot;${target}&quot; &gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;property 
169402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;type&quot; value=&quot;feature&quot; /&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;property 
170402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;id&quot; value=&quot;org.eclipse.jdt&quot; /&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ant&gt;<BR>&lt;/target&gt;</B></P><P>The 
171402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.pde.build/scripts/genericTargets.xml?rev=HEAD&content-type=text/xml">genericTargets.xml 
172402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll</A>script is an Ant script in the org.eclipse.pde.build plug-in containing targets 
173402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollwhich call PDE Build custom Ant tasks to generate scripts for the specified elements 
174402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollat various stages of the build. This script also executes the generated scripts 
175402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollat various build stages. The target property is set by it's calling script, org.eclipse.pde.build/scripts/build.xml.<BR><BR>For 
176402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollexample, the fetch target in the build.xml calls allElements and sets the target 
177402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollto property to &quot;fetchElement&quot;:<BR><BR> &lt;ant antfile=&quot;${customTargets}&quot; 
178402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltarget=&quot;allElements&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;property 
179402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;target&quot; value=&quot;fetchElement&quot; /&gt;<BR> &lt;/ant&gt;<BR><BR>The 
180402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollresult of this is that the fetchElement target in genericTargets.xml is executed 
181402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollusing arguments type and id set in allElements.<BR></P></TD></TR><TR><TD WIDTH="24%">assemble.&lt;element.id&gt;[.config.spec]</TD><TD WIDTH="76%"><P>For 
182402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollevery configuration specified in the build.properties for the distribution (see 
183402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<A HREF="#configs">configs</A> above), a target named &quot;assemble.&lt;element.id&gt;.&lt;config.spec&gt;&quot; 
184402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollis required. If the distribution is not platform-specific, the &quot;.&lt;config.spec&gt;&quot; 
185402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollsection of the target name is not required. </P><P>Providing the target name should 
186402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollbe all that is required unless you wish to give the produced binary distributable 
187402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfile a name different from the default &quot;&lt;elment-id&gt;-&lt;buildid&gt;-&lt;config.spec&gt;.zip&quot;. 
188402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollIn this case, an explicit value for the property &quot;archiveName&quot; should 
189402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollbe specified at the beginning of the target.<BR><BR>Example from <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.releng.eclipsebuilder/jdt/customTargets.xml?rev=HEAD&content-type=text/xml">org.eclipse.releng.eclipsebuilder/jdt/customTargets.xml</A>:<BR><BR> 
190402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollSince two configurations for building the org.eclipse.jdt distribution are specified 
191402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollin it's build.properties &quot;configs=*,*,* &amp; macosx,carbon,ppc&quot;, the 
192402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfollowing two targets are provided in the customTargets.xml script.</P><P><FONT COLOR="#000000"><B>&lt;target 
193402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;assemble.org.eclipse.jdt&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;property 
194402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;archiveName&quot; value=&quot;eclipse-JDT-${buildId}.zip&quot;/&gt;<BR> 
195402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ant antfile=&quot;${assembleScriptName}&quot;/&gt;<BR>&lt;/target&gt;</B></FONT></P><P><B><FONT COLOR="#000000">&lt;target 
196402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;assemble.org.eclipse.jdt.macosx.carbon.ppc&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;property 
197402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;archiveName&quot; value=&quot;eclipse-JDT-${buildId}-macosx-carbon.tar.gz&quot;/&gt;<BR> 
198402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ant antfile=&quot;${assembleScriptName}&quot;/&gt;<BR>&lt;/target&gt;</FONT></B><BR></P></TD></TR><TR><TD WIDTH="24%"><A NAME="getmaps"></A>getMapFiles</TD><TD WIDTH="76%"><P>The 
199402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollresult of executing this target should be to place *.map files in any directory 
200402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollor subdirectory under ${buildDirectory}/maps. All .map files found here are concatenated 
201402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollinto a single file ${buildDirectory}/directory.txt. Map file projects are typically 
202402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollkept under version control in a CVS repository. <BR><BR>In the following example 
203402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfrom <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.releng.eclipsebuilder/sdk/customTargets.xml?rev=HEAD&content-type=text/xml">org.eclipse.releng.eclipsebuilder/sdk/customTargets.xml</A>, 
204402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe implementation of this target and it's helper targets are provided to illustrate 
205402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollhow map files for Eclipse builds are checked out from a CVS repository and then 
206402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltagged with the build timestamp to capture the versions of all projects used in 
207402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe build.<BR><BR><B>&lt;target name=&quot;getMapFiles&quot; depends=&quot;checkLocal&quot; 
208402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollunless=&quot;mapsLocal&quot;&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;property 
209402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;mapCvsRoot&quot; value=&quot;:pserver:anonymous@dev.eclipse.org:/home/eclipse&quot; 
210402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll/&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;property name=&quot;mapVersionTag&quot; 
211402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollvalue=&quot;HEAD&quot; /&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cvs cvsRoot=&quot;${mapCvsRoot}&quot;<BR> 
212402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;package=&quot;org.eclipse.releng&quot;<BR> 
213402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dest=&quot;${buildDirectory}/maps&quot;<BR> 
214402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tag=&quot;${mapVersionTag}&quot;<BR> 
215402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&lt;antcall target=&quot;tagMapFiles&quot; 
216402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll/&gt;<BR>&lt;/target&gt;</B></P><P><B><FONT COLOR="#008000">&lt;!--helper targets---&gt;</FONT><BR></B><B><BR>&lt;target 
217402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;checkLocal&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;available 
218402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollproperty=&quot;mapsLocal&quot; file=&quot;${buildDirectory}/maps/org.eclipse.releng&quot; 
219402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll/&gt;<BR>&lt;/target&gt;<BR></B></P><P><B>&lt;target name=&quot;tagMapFiles&quot; 
220402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollif=&quot;tagMaps&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cvs dest=&quot;${buildDirectory}/maps/org.eclipse.releng&quot; 
221402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollcommand=&quot;tag v${timestamp}&quot; /&gt;<BR>&lt;/target&gt;</B><BR><BR></P></TD></TR><TR><TD WIDTH="24%" HEIGHT="24">preSetup 
222402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland postSetup</TD><TD WIDTH="76%" HEIGHT="24"><P>Used to run operations before 
223402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland after retrieving the map files.<BR><BR>Example from <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.releng.gefbuilder/sdk/customTargets.xml?rev=HEAD&content-type=text/xml&cvsroot=Tools_Project">org.eclipse.releng.gefbuilder/sdk</A>. 
224402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollThis example demonstrates how the postSetup target (and a helper target) is used 
225402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollto download and install an Eclipse SDK to compile against.</P><P><B>&lt;target 
226402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;postSetup&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;available 
227402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfile=&quot;${buildDirectory}/eclipse-SDK.zip&quot; property=&quot;baseExists&quot; 
228402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll/&gt; <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;antcall target=&quot;getBaseEclipse&quot; 
229402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll/&gt; <BR> &lt;/target&gt;<BR></B></P><P><B>&lt;target name=&quot;getBaseEclipse&quot; 
230402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollunless=&quot;baseExists&quot;&gt;</B></P><P><B><FONT COLOR="#008000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!--this 
231402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltask definition is available in org.eclipse.releng.basebuilder/plugins/org.eclipse.build.tools. 
232402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollIt removes the &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_&nbsp;&lt;version&gt; 
233402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfrom all directories specified as a value for the directory attribute. </FONT></B><FONT COLOR="#008000"><B>Not 
234402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollreally necessary, but helpful in &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this 
235402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollcase to avoid having/needing hard-coded versions in GEF javadoc scripts.--&gt;</B></FONT><B></B><B><BR></B><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;taskdef 
236402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;stripVersions&quot; classname=&quot;org.eclipse.releng.VersionNumberStripper&quot; 
237402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll/&gt; <BR> <BR><FONT COLOR="#008000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!--this 
238402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollproperty file contains the values for ${eclipseURL} and ${eclipseBuildID}--&gt;</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;property 
239402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfile=&quot;${buildDirectory}/maps/org.eclipse.gef.releng/maps/build.cfg&quot; 
240402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll/&gt; <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;get src=&quot;${eclipseURL}/eclipse-SDK-${eclipseBuildID}-win32.zip&quot; 
241402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldest=&quot;${buildDirectory}/eclipse-SDK.zip&quot; /&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;exec 
242402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldir=&quot;${buildDirectory}/..&quot; executable=&quot;unzip&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;arg 
243402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollline=&quot;-o -qq eclipse-SDK.zip&quot; /&gt; <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/exec&gt;<BR> 
244402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;stripVersions 
245402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldirectory=&quot;${buildDirectory}/plugins&quot; /&gt; <BR><BR><FONT COLOR="#008000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- 
246402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollExtract doc.zip so we can create links in GEF java doc --&gt; </FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;exec 
247402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldir=&quot;${buildDirectory}/plugins/org.eclipse.platform.doc.isv&quot; executable=&quot;unzip&quot;&gt;<BR> 
248402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;arg line=&quot;-o 
249402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll-qq doc.zip&quot; /&gt; <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/exec&gt;<BR> &lt;/target&gt;</B><BR><BR></P></TD></TR><TR><TD WIDTH="24%">preFetch 
250402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland postFetch </TD><TD WIDTH="76%"><P>Used to run operations before and after 
251402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfetching source for the build.<BR></P><P>Example from <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.releng.gefbuilder/sdk/customTargets.xml?rev=HEAD&content-type=text/xml&cvsroot=Tools_Project">org.eclipse.releng.gefbuilder/sdk</A>. 
252402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollThis example demonstrates how the postFetch target can be used to set the build 
253402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltimestamp as a value for &quot;0&quot; in about.mappings files.<BR><BR><B>&lt;target 
254402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;postFetch&quot;&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;replace dir=&quot;${buildDirectory}/plugins&quot; 
255402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollvalue=&quot;${timestamp}&quot; token=&quot;@buildid@&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include 
256402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;**/about.mappings&quot; /&gt; <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/replace&gt;<BR> 
257402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&lt;/target&gt;</B></P></TD></TR><TR><TD WIDTH="24%">preGenerate and postGenerate</TD><TD WIDTH="76%"><P>Used 
258402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollto run operations before and after generating build.xml files for features, plug-ins 
259402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland fragments.<BR><BR>Example from <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.releng.gefbuilder/sdk/customTargets.xml?rev=HEAD&content-type=text/xml&cvsroot=Tools_Project">org.eclipse.releng.gefbuilder/sdk</A>. 
260402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollThis example demonstrates how the postGenerate target (and a helper target) is 
261402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollused to run the build.xml scripts to clean the source of any stale, pre-compiled 
262402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molljars that might exist in the source directories. jars are not recompiled if they 
263402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollalready exist in plug-in or fragment directories.<BR></P><P> <B>&lt;target name=&quot;postGenerate&quot;&gt;<BR> 
264402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;antcall target=&quot;clean&quot; /&gt; <BR> 
265402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&lt;/target&gt;</B></P><P><B>&lt;target name=&quot;clean&quot; unless=&quot;noclean&quot;&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;antcall 
266402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltarget=&quot;allElements&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;param 
267402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;target&quot; value=&quot;cleanElement&quot; /&gt; <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/antcall&gt;<BR> 
268402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&lt;/target&gt;<BR></B></P></TD></TR><TR><TD WIDTH="24%">preProcess and postProcess</TD><TD WIDTH="76%"> 
269402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollUsed to run operations before and after compiling the source.</TD></TR><TR><TD WIDTH="24%">preAssemble 
270402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland postAssemble</TD><TD WIDTH="76%">Used to run operations before and after assembling 
271402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe binary distributables.</TD></TR><TR><TD WIDTH="24%">postBuild</TD><TD WIDTH="76%"><P>Used 
272402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollto run operations at the end of the build.<BR></P><P>Example from <A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.releng.gefbuilder/sdk/customTargets.xml?rev=HEAD&content-type=text/xml&cvsroot=Tools_Project">org.eclipse.releng.gefbuilder/sdk</A>. 
273402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollThis example demonstrates how the postBuild target (and a helper target) is used 
274402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollto gather and place the compile logs in the ${buildLabel} directory. These files 
275402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollare used in the publishing of the GEF build (see below under Publishing the Build 
276402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollsection).<BR></P><P><B>&lt;target name=&quot;postBuild&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;antcall 
277402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltarget=&quot;gatherLogs&quot; /&gt; <BR> &lt;/target&gt;<BR><BR>&lt;target name=&quot;gatherLogs&quot;&gt;<BR> 
278402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;mkdir dir=&quot;${buildDirectory}/${buildLabel}/compilelogs&quot; 
279402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll/&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;antcall 
280402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molltarget=&quot;allElements&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;param 
281402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;target&quot; value=&quot;gatherLogs&quot; /&gt; <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/antcall&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;unzip 
282402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldest=&quot;${buildDirectory}/${buildLabel}/compilelogs&quot; overwrite=&quot;true&quot;&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;fileset 
283402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molldir=&quot;${buildDirectory}/features/org.eclipse.gef.sdk&quot;&gt;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;include 
284402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollname=&quot;*.log.zip&quot; /&gt; <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/fileset&gt;<BR> 
285402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/unzip&gt;<BR> &lt;/target&gt;</B><BR><BR></P></TD></TR></TABLE><P>&nbsp;</P><HR><P><BR><FONT SIZE="+2"><B><A NAME="buildexec"></A>Build 
286402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollExecution </B></FONT></P><P><FONT SIZE="+1"><A NAME="buildmachinesetup"></A><B>Build 
287402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollmachine setup</B></FONT><BR><BR>This build process can be executed on any of the 
288402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll<A target="extra" HREF="http://www.eclipse.org/eclipse/development/eclipse_project_plan_3_2.html#TargetOperatingEnvironments">Eclipse 
289402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll3.2 Reference Platforms</A> plus the following:</P><UL><LI><A target="extra" HREF="http://www.cvshome.org/">CVS</A> 
290402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollclient version 1.10 or higher on system path. </LI><LI><A target="extra" HREF="http://www.info-zip.org/pub/infozip/">Info-Zip</A> 
291402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollzip and unzip executables on system path.</LI><LI><A target="extra" HREF="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng.basebuilder/">org.eclipse.releng.basebuilder</A> 
292402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollfrom dev.eclipse.org or any Eclipse 3.2 stream SDK install. Please note that the 
293402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollMailer java class in this project require a j2ee.jar on the classpath to compile 
294402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Molland run. This class is not used in the mechanism described in this document.</LI></UL><P>The 
295402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollcvs, zip and unzip executables should be placed on the system path.</P><P> On 
296402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael MollWindows systems, the HOME environement variable should be set to &quot;c:&quot; 
297402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll(no slash) for CVS operations.</P><P>The org.eclipse.releng.basebuilder project 
298402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollcan be placed in any directory.</P><P><BR><B><FONT SIZE="+1"><A NAME="runbuild"></A>Running 
299402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollthe Build</FONT></B></P><P>To run the build, execute the following command from 
300402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll/plugins/org.eclipse.pde.build/scripts to <B>build a single distribution</B>:<BR><BR><B>java 
301402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll-jar &lt;path&gt;/startup.jar -application org.eclipse.ant.core.antRunner [-buildfile 
302402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Mollbuild.xml] -Dbuilder=&lt;path to directory containing build.properties and customTargets.xml&gt; 
303402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll[Ant property settings to override those in <A HREF="#build.properties" TARGET="_blank">build.properties</A>]</B><B><BR></B></P><P>&nbsp;</P>
304402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll</BODY>
305402794e73aed8611d62eb4b01cd155e2d76fcb87Raphael Moll</HTML>
306