Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Orbit Source Bundles

Warning2.png
Note: The contents of this page are retained for historical significance. Please see https://github.com/eclipse/orbit#readme for current information.


Originally created from bug 184026 and then updated to describe the changes for JAR'd source bundles as per bug 206596.

What you need to do

If you have bundles in Orbit and you would like to have source bundles automatically generated for you, here are the things that you have to do:

 * put your bundles in the structure below
 * add a map file entry for your source bundle

Bundle structure

In order to leverage the automatic infrastructure, avoid the profusion of projects in CVS and simplify management, it is recommended that you store the source bundles in the same project than its binary counter part. This is achieved by creating a sub-folder called "source-bundle" in the project. This folder will be setup like any other bundle with a manifest.mf, build.properties, etc...

{plugin_root}
	about_files/
	META-INF/MANIFEST.MF
	about.html
	build.properties
	plugin.properties
	{class_files}
	...
	source-bundle/
		about_files/
		META-INF/MANIFEST.MF
		about.html
		build.properties
		plugin.properties
		...
		{source_files}

Example for javax.servlet 2.4

javax.servlet
	about_files/
	META-INF/MANIFEST.MF
	about.html
	build.properties
	javax/servlet/{dot_class_files}
	plugin.properties
	source-bundle/
		about_files/
		META-INF/MANIFEST.MF
		about.html
		build.properties
		plugin.properties
		javax/servlet/{dot_java_files}

MANIFEST.MF

In the old Eclipse method, source bundles were contributed to Eclipse by using an extension point. In the new method, you will need to add a new bundle header to your bundle manifest to tell Eclipse that your bundle is a source bundle and to specify the id and version of the host bundle.

Eclipse-SourceBundle: my.bundle.id;version="1.0.0.qualifier"

This is the format for the most common case; where the bundle source is unzipped at the root of the source bundle.

Multiple Roots

If you have multiple folders in your source bundle which specify source, then you must tell Eclipse that there are multiple roots. This can be the case for instance if you ship an un-JAR'd bundle with multiple source zip files that you don't want to merge into a single directory structure.

Eclipse-SourceBundle: my.bundle.id;version="1.0.0.qualifier";roots:="folder1,folder2"

build.properties

The build.properties file for the source bundle is pretty simple, just include all the files you want in your bundle. For instance:

bin.includes = about.html,\
               about_files/,\
               plugin.properties,\
               META-INF/,\
               javax/

Back to the top