To build feature:
BRT 7/18/2006

Goal: package all plugins as jars, package feature as a folder.

(1) plugin build setup
(2) feature setup
(3) feature export

(1) plugin build setup
In EACH plugin manifest, be sure to:

(a) assure there IS a MANIFEST.MF.  If not, go to overview page for plugin.xml
and click on the link to build an OSGi bundle manifest(this is the MANIFEST.MF file)
(Note: this link doesn't appear if the project already has a MANIFEST.MF)

(b) Build page: don't build a jar (since we will jar the whole plugin): 
Under runtime information, delete a jar if it's there, and Add Library of '.'
then on right side while '.' is selected, Add folder of 'src/' 
Under Binary Build, the following should be selected:
META-INF, icons (if any), plugin.xml
(Note: the classes will be included automatically because of the '.' at the top under
runtime information)
And, any other resources the plugins needs such as html files, etc.

(c)To get the classes included in the build:
on 3.1 build page there is a checkbox for "include selected library in binary build" 
which modifies build.properties to put '.' in bin.includes   ... 
there is no checkbox on 3.2 build page.   
You may have to manually edit build.properties to do this in 3.2
=====================
Part of build.properties:
bin.includes = plugin.xml,\
               META-INF/,\
               icons/,\
               .          <==== make sure this line is there
=====================

(d)and on runtime tab of manifest editor, under classpath (lower right),
specify classpath='.'  only.  Delete a jar file if there, and do "New..." to
add  '.' as the new library name.


-----------------

(2) feature setup
In this feature project, edit the manifest (feature.xml)
and on the plug-ins tab, select  each plug-in and be sure to 
uncheck
"Unpack the plugin archive after the plugin installation"

This makes sure the plugins get packaged as jars, not folders.


------------------
(3) feature export
Use export. Ant build seems to work BUT I can't figure out how to get ant build 
to jar the plugins and not jar the feature.

Context menu on feature (org.eclipse.ptp.pldt) project.
Export, deployable features

In tabbed section at bottom of export Wizard first page,
check "Archive file" and set it to something like
<workspace-location>/org.eclipse.ptp.pldt/org.eclipse.ptp.pldt-1.0.0-YYYYMMDDHHMM.zip

On the options tab, do NOT select "package as individual jar archives."
This jars the feature too, which doesn't work.
The feature setup item above sets the jarring of the individual plug-ins.


==== the zip that is built will not have eclipse as its root
unzip to c:\temp\eclipse, 
rename orig. archive (so empty dirs don't get created) 
then re-zip with eclipse as its root into the final zip file name.
OR use rezip.bat  which automates this [brt]
===========
Upload notes
Once you've exported the feature and  
zipped it up, try this command:

		 scp zip_file.zip user@dev.eclipse.org:downloads/tools/ptp/builds

where 'btibbitts' is your committer username and zip_file.zip is:

		 org.eclipse.ptp.pldt-1.1-IYYYYMMDDHHMM.zip

where I is a capital i (for integration) and YYYYMMDDHHMM is  
the year, month, day, hour and minute of the build.

