Bug 216637 - [p2] Provide p2 properties to PDE build during export/builds
Summary: [p2] Provide p2 properties to PDE build during export/builds
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M5   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks: 218561
  Show dependency tree
 
Reported: 2008-01-25 15:51 EST by Curtis Windatt CLA
Modified: 2008-02-11 16:23 EST (History)
3 users (show)

See Also:
baumanbr: review+


Attachments
Work in progress (5.08 KB, patch)
2008-02-01 15:14 EST, Curtis Windatt CLA
no flags Details | Diff
Patch for M5 (5.06 KB, patch)
2008-02-04 18:51 EST, Curtis Windatt CLA
no flags Details | Diff
mylyn/context/zip (956 bytes, application/octet-stream)
2008-02-04 22:18 EST, Chris Aniszczyk CLA
no flags Details
updated patch (2.65 KB, patch)
2008-02-05 16:47 EST, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2008-01-25 15:51:35 EST
In 3.4, PDE Build will have support to generate p2 metadata when building/exporting plugins, features, and update sites.  If Eclipse is p2 aware, metadata generation should be invoked.  To do so, we must pass a number of properties to PDE Build.

generate.p2.metadata = true
p2.metadata.repo = file://${buildDirectory}/repo
p2.artifact.repo = file://${buildDirectory}/repo
p2.flavor = tooling
p2.publish.artifacts = false

Additional info about PDE/p2 integration can be found on the wiki page at
http://wiki.eclipse.org/Equinox_p2_PDE_Integration
Comment 1 Brian Bauman CLA 2008-01-25 17:47:00 EST
This should be pretty simple.  Do you want to take a crack at it Curtis?

BTW, my favorite property from above is "p2.flavor", can we put spicy? :)
Comment 2 Curtis Windatt CLA 2008-01-28 10:02:43 EST
I assumed that it would be Darin or myself that would be working on this.  We also will be working on the p2 target provisioner.

Hopefully spicy and honey garlic flavours will be supported.
Comment 3 Curtis Windatt CLA 2008-02-01 15:14:59 EST
Created attachment 88629 [details]
Work in progress
Comment 4 Curtis Windatt CLA 2008-02-04 18:51:06 EST
Created attachment 88845 [details]
Patch for M5

This patch adds the needed properties on export to generate p2 metadata.  However, they are only available when exporting to a directory.

For M6 we will need to handle exporting to an archive file, add constants for the properties, and possibly add the option to turn off the generation via a preference.
Comment 5 Curtis Windatt CLA 2008-02-04 18:52:45 EST
Chris, it would be nice if metadata generation could be done, even in a limited context in M5.  If possible, please review and commit the patch.  The additional properties have no effect in non-p2 builds.
Comment 6 Chris Aniszczyk CLA 2008-02-04 22:18:52 EST
looks ok, doesn't break exisiting scenarios atm :)
Comment 7 Chris Aniszczyk CLA 2008-02-04 22:18:59 EST
Created attachment 88851 [details]
mylyn/context/zip
Comment 8 Brian Bauman CLA 2008-02-04 22:48:54 EST
Thanks Curtis for submitting a patch in time to include it in M5 and thanks Chris for making sure it got in.  You guys rock!
Comment 9 Andrew Niefer CLA 2008-02-05 16:45:16 EST
There are a couple of issues:
1) Exporting for multiple platforms, the resulting p2 data is incorrect because of the platform subfolders in the export directory

2) Exporting Products.  The product metadata is not complete because export does not run the top level assemble script, it only runs the platform specific assemble scripts.

3) I am informed that our flavor should be "tooling" for now

4) There is probably a problem with folder shaped features/plugins

Attached patch does
1) set p2.publish.artifacts = true
2) set p2.*.repo = destination/p2repo
3) set flavor=tooling
4) Turn of p2 metadata generation for product export

The result is for export you get the normal results + a p2repo folder.  The p2repo folder contains copies of all the jars and the metadata in the correct shape.
Comment 10 Andrew Niefer CLA 2008-02-05 16:47:26 EST
Created attachment 88941 [details]
updated patch
Comment 11 Curtis Windatt CLA 2008-02-05 17:03:37 EST
Thank you for the patch and the clarification Andrew.  Brian/Chris, can you guys put this patch in for M5?
Comment 12 Brian Bauman CLA 2008-02-05 17:06:36 EST
I can review this one.
Comment 13 Brian Bauman CLA 2008-02-05 17:11:41 EST
Looks safe to me.  Thanks Andrew for the help, we always appreciate the guidance.

Patch committed to HEAD, will be available in the next I-Build.