build pde

Where’s the source? has many repositories – where does the source reside for the bundles you’re interested in?

Photo credit sanja gjenero

In 3.6M7, the PDE team implemented new functionality to allow you to enable including references to the source location in the manifests of your binary bundles. To enable this in your build, you need to invoke your build with bundles from I20100414-1200 or later and add the following


to the of your builder. 

During the build process, PDE build generates a file called in same directory as your generated fetch scripts that lists all repository information for the bundles compiled from source. It looks something like this:

#Tue Apr 20 09:23:19 EDT 2010,0.0.0=scm\:cvs\:pserver\\:/cvsroot/eclipse\;tag\=v20090429_1800

The source references are generated from the map files.  If you specify extssh connections in your map files, you may want to replace them in the file with pserver connections in the postFetch phase. Only committers use ssh to connect to  🙂

The resulting bundles from the build will with have a new Eclipse-SourceReferences header in their manifests.  The manifest for the org.eclipse.osgi bundle from today’s integration build is an example.

The source references in the manifest can be consumed by PDE when you import a binary bundle into your workspace, so you can easily find the source. When you import your bundles, you can select Import As Projects from a repository.

Select the bundle(s) to import

You’ll be prompted if you want to import the version specified in the manifest or from HEAD. Since the bundles we are using are from an integration build and have the version specified, we’ll use the v20100419 version.

You’ll be prompted for a connection to use and then voila! Version 20100419 of org.eclipse.osgi will appear in your workspace.

This should be useful to people to find the source of the eclipse projects that they would like to contribute to or consume.  It would also be interesting to see how this works with other SCMs, all of our source resides in CVS. 

Thanks PDE team!

For more information see the following bugs
Support embedding repository information in released bundles 
Test generating source references in the build

6 comments on “Where’s the source?

  1. I would not have come across it without your post, thanks! That really is a time saver.

    Very useful if you work with different target platforms w/o source attachment and want to do some debugging.


  2. That sounds really cool.
    1. Would that work with git ? I never tried map files with it.
    2. Does Eclipse need to be aware of the presence of the SCM ? Can one enter the entry himself ?


  3. Antoine,

    1) If you are familiar with pde build, you know you must define a fetch factory to generate fetch scripts to retrieve source from a specific repository type.

    For example, here are instructions for a SVN fetch factory

    So today, there isn't a fetch factory for git. There is a bug for this in the EGit bucket

    2) I think you are asking if you could modify the manifest to include the information manually. Is this what you are asking?

    I talked to Andrew Niefer and this is possible. You would also have to use the pde ui extension point so pde ui could import from the git repository.

    If you have more questions, I'd suggest asking on the pde-dev list list.


  4. OK!

    I guess 1. will be addressed, 2. is cool 🙂


  5. This comment has been removed by the author.


  6. I found this post very helpful. I recently tried to change our map files, on the fly, after the “getMaps” task, to use “:local:” (when on build machine, as is supposed to be faster). But, that messed up our Eclipse-SourceReferences (they used “:local:” too, which is no good) so I had to back out that improvement. But, after reading this post, I see I could add back, and just do a second fixup in the post fetch task, and change file then. Very helpful post. I would have never found that on my own.


Leave a Reply to David Williams Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: