## Shipping Your Plug-in As A Single JAR

Eclipse 3.0 and previous was shipped such that each plug-in was a directory that contained code in a JAR, along with multiple other files. In order to improve the number of files that we ship along with the size of the Eclipse distributions, we have added support in Eclipse to be able to ship each plug-in as a single JAR file containing its code and other resources.

Converting A Plug-in to be Shipped as a JAR

1. Change the classpath:

- If you have a `manifest.mf` then simply delete the `Bundle-Classpath` header.
- Otherwise if you have a `plugin.xml` then change the library entry to be a dot like this:
  `<runtime>
  <library name=".">
  <export name="*"/>
  </library>
  </runtime>`

2. Change the `build.properties`:

- Change all occurences of the old jar name to simply a dot. `(.)`
- There should be one on the `bin.includes` line. For instance, if your `bin.includes` line used to have `core.jar`, that will be replaced with a `.`.For instance: `bin.includes=about.html,.,META-INF/MANIFEST.MF`
- Change `source.foo.jar=` to `source..=` (that is source dot dot)
- Change `output.foo.jar=` to `output..=` (that is output dot dot)
- There may be others like `jars.compile.order`, etc
- If you newly generated a `manifest.mf`, then add `META-INF/` to the `bin.includes`.

3. Change the feature

- find all features that list your plug-in and add following to the related `<plugin>` tag:
  `unpack="false"`

4. Change `about.html` linked content.

- If you have a basic `about.html` with no linked files, then you don't need to do anything.
- If you have content in your plug-in which is linked from your `about.html` file, then that content must be placed in a directory named `"about_files"` at the root of the plug-in.
- Make sure to change the links in the `about.html` to point to the new location of the files!

If you have a custom build script (`build.xml`):

- You need to ensure that your script will still work against plug-ins that are JAR'd as well as plug-ins which aren't JAR'd.

If you have other scripts (e.g. javadoc generation scripts):

- If the script assumes the layout of plug-ins and needs to add code JAR files to the classpath, then it must be modified to put the whole JAR'd plug-in on the classpath rather than the individual JARs.