Dark Planet Development Platform

Get Dark Planet Development Platform at SourceForge.net. Fast, secure and Free Open Source software downloads

Pre-Requisites: Setting up Eclipse for DPS Development with OSGi

There are three things you need to get started with Eclipse and OSGi with an optional fourth download:

  1. Install Java 6 or better. Older versions back to Java 4 should work but haven't been tested. If you decide to use an older JDK, you'll need to change the MANIFEST files in the bundles as they specify Java 6 as the minimum runtime environment.
  2. Make sure you have Eclipse Helios or better with the Plug-in Development Environment (PDE). Older versions of Eclipse may work but haven't been tested. If you can get to the "Plug-In Development" perspective in Eclipse then you likely have everything you need.
  3. Download or checkout the following bundle dependencies: Extract these as projects into your Eclipse workspace. These are the minimum required bundles dependencies. The reference implementations require a few more bundles but that's covered in the appropriate tutorials.
  4. (optional) If you plan to release your own OSGi-based DPS application then you'll eventually want to install our build target or create your own. We advise that you skip setting the build target for now as it's a large download and you really don't need it for initial development.

    The build target defines the base bundles which will be included when you release an OSGi application. Our build target includes something called the "delta pack", as well as bundles for RCP (Rich Client Platform) and Equinox. This is a very common style of target platform which includes things you'll need to run on different operating systems (the delta pack), things you'll need to run OSGi (Equinox), and things you'll need if you want to build Eclipse driven GUI tools (the RCP). As a result, our build target is pretty large, about 200 MB. If you want to install our build target then download or checkout "EveTarget" and extract it as a project in your Eclipse workspace. You can set "EveTarget" as your build target as follows:

    1. Select Window->Preferences->Plug-in Development->Target Platform
    2. Look for the entry called "BaseEveTarget".
    3. Select the checkbox beside "BaseEveTarget" and click "Apply" and "Ok".

How to Import Downloaded Bundles

Except for the build target, all of the downloads we provide are exported binary bundles (i.e. JARs) from a tagged release. The build target is a compressed archive rather than a bundle and has to be imported as an "existing Eclipse project" after extraction. DPS bundles currently always include source, or you can simply checkout the corresponding project in our source tree under releases/<bundle_version>.

Eclipse makes it very easy to import a bundle:

  1. First download the appropriate bundle. This will give you a JAR file.
  2. Open up Eclipse and select File->Import...->Plug-in Development->Plug-ins and Fragments.
  3. Under "Import From" choose "Directory" and browse to the directory where you downloaded the jar.
  4. Under "Plug-ins and Fragments to Import" choose "Select from all plug-ins...".
  5. Under "Import As" you have a choice. You can choose "Binary projects" if you just want the compiled JAR dependency, or you can choose "Projects with source folders" to create a project with the downloaded source placed in the "src" folder.
  6. Click "Next >" and select the plug-ins you want to import.
  7. Click "Finish" and you're done, you should see the imported bundle in your workspace.

Special Handling for Unit Testing and Reference Implementation Unit Tests

For reasons we haven't quite figured out yet, you need to import the junit bundle and any unit test bundles as source bundles. If you don't do this, then you either get an error that JUnit can't be found, or you get a complaint that no unit tests can be found. Both problems go away when you import as source bundles.