I often work with teams getting started with Eclipse RCP, and the most common complaint I hear is that it’s too hard to set up automated builds. PDE Build can be frustrating to work with because it’s a black box. Your code goes in one side and a fully branded RCP application pops out the other. But if something goes wrong inside the box, where do you start to debug?
In my opinion, the best way to work with PDE Build is to get a very simple build running in your environment. Then make small, incremental additions, verifying the integrity of the process after each change. So the immediate problem for a team becomes: How do I get that first build running?
To help with this, I’ve put together a simple feature-based RCP product build. Just download and import the sample projects. If you follow the instructions in the included readme.txt file, you should have a build running fairly quickly. Before you know it, you’ll be seeing that always elusive BUILD SUCCESSFUL message flash across your screen!
Eclipse 3.5 Sample
Eclipse 3.6 Sample
Note: If you want to run this sample build using Eclipse 3.2, you’ll need to work around a PDE Build defect. For instructions on how to do this, check out the “Problems parsing feature file in a product build” section on the PDE Build wiki page.


Hi Patrick,
I have ported your sample of helloeworld into eclipse 3.7, and it works perfect.
Now I have my own plugs and feature, I was able to build but got some errors as below when I tried to run the executable:
!ENTRY org.eclipse.osgi 2 0 2011-12-22 15:35:33.343
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-12-22 15:35:33.343
!MESSAGE Bundle reference:file:plugins/com.john.trace_2.3.5.201112221201.jar was not resolved.
!SUBENTRY 2 com.john.trace_2 0 2011-12-22 15:35:33.343
!MESSAGE Missing required bundle org.eclipse.ui.console_0.0.0.
!SUBENTRY 2 com.john.trace_2 0 2011-12-22 15:35:33.343
!MESSAGE Missing required bundle org.eclipse.jface.text_0.0.0.
!SUBENTRY 2 com.john.trace_2 0 2011-12-22 15:35:33.343
!MESSAGE Missing required bundle org.eclipse.core.resources_0.0.0.
!SUBENTRY 2 com.john.trace_2 0 2011-12-22 15:35:33.343
!MESSAGE Missing required bundle org.eclipse.ui.views_0.0.0.
!SUBENTRY 2 com.john.trace_2 0 2011-12-22 15:35:33.343
!MESSAGE Missing required bundle org.eclipse.ui.ide_0.0.0.
where com.john.trace is my own plugin. I am sure that the feature and plugin included all these plugins as dependencies complained here.
How can I let PDE build to grab these non-RCP plugins?
I appreciate if you can shed the light.
Thanks,
John
Hi John,
I’m glad the example worked for you. As for the missing bundles, they need to be:
1. Included in your product configuration, either as individual plugins or as part of a feature. Feel free to create your own feature to reference the missing plugins if you like.
2. Included in your target platform for the build. This is the directory referenced by the “baseLocation” property in the build.properties file.
Hope this helps,
— Patrick
[...] a previous post, I provided a set of projects that you could use to get a sample build running quickly. The idea [...]
Hi Patrick,
I am trying your example in eclipse JUNO,
I am not able to get it work
after generateFeature:
it gives lots of dependency issue..i have pasted some of them.Can you help me get this work in eclipse juno (4.2)
[java] generateFeature:
[java] [eclipse.generateFeature] Some inter-plug-in dependencies have not been satisfied.
[java] [eclipse.generateFeature] Bundle org.eclipse.e4.ui.model.workbench:
[java] [eclipse.generateFeature] Missing required plug-in org.eclipse.emf.ecore_[2.6.0,3.0.0).
[java] [eclipse.generateFeature] Missing required plug-in org.eclipse.emf.ecore.xmi_[2.6.0,3.0.0).
[java] [eclipse.generateFeature] Bundle org.eclipse.e4.ui.workbench.addons.swt:
[java] [eclipse.generateFeature] Missing required plug-in org.eclipse.e4.ui.model.workbench_0.9.1.
[java] [eclipse.generateFeature] Missing required plug-in org.eclipse.e4.ui.workbench_0.9.1.
Thanks
Ambika
Hi Patrick
After changing the baselocation in build.properties to my eclipse RCP SDK path, i could get it build the zip file(though it still had some depenendency error in ant log on console) but unfortunately it doent have any exe.Can you please shed some light on why it could have happened.
Thanks
Ambika
Hi Ambika,
Do you have the RCP Delta Pack extracted to your baseLocation? This is the archive that contributes the launchers.
— Patrick
Hi Patrick,
Thanks a lot.I added the delta pack and was able to build the exe.I did the same with my product and got the exe too.But now i am having trouble in getting p2 update site work for Juno.Can you give me some pointers for this?
thanks
Ambika
Hi Ambika,
Check out this documentation:
http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.pde.doc.user/tasks/pde_p2_integration.htm
You’ll want to set p2.gathering=true in your build.properties file and also specify the p2 repository to publish to.
— Patrick
Hi Patrick
If I am giving the relative path for eclipse and deltapack, it is giving nullpointer exception. Could you please help me fixing this issue.
Hi Sarat,
If you replace the relative path with a hard-coded absolute path, does the build work?
— Patrick
Hi Patrick,
Thank you very much for the quick response.
If I am replacing with hard coded value, it is building fine. If am giving the relative path it is giving Nullpointer Exception
Thanks,
Regards,
Sarat
My guess is that the relative paths are relative to the wrong directory. Are you using the Ant’s base directory to figure out the relative paths?