The initial project and a frame

So the first thing I want to do is to start the OSGI platform and display my main frame.

First I need to create a project for my first bundle. Setting up the project is not so easy as I expected it. One thing I want to use is Maven for building and packaging the bundle. Why? Because I want to! No, using Eclipse makes it very easy because it comes with PDE and some wizards to create an OSGI conform project. The problem is that I want to use continous integration and all other fancy stuff I’m used to in my daily developer life. I know it is also possible with Eclipse PDE but then I would also need all the supplemental scripts Eclipse is using for their build infrastructure. I have no glue how they work, so this can also be interesting 🙂 . But this time I have to ignore there’s just not enough time. So back to Maven. The basic POM file is created just easily by copying it from some other projects.

The changes I had to make are listed below:

      <bundle-vendor>Daniel Rohe</bundle-vendor>

The packaging needs to be „bundle“ and I need to add a dependency to the OSGI framework. Who would have guessed! Beside that the only big change is in the build’s plugins section. There the maven-bundle-plugin has to be added and configured. But I think everything is straight forward. Having this configuration ready brings me up to work. But there is one thing missing! The maven-bundle-plugin is a snapshot version, so I have to include the snapshot repository.

<!-- repository required for building OSGI bundles using Maven 2.0 -->
  <name>snapshot plugins</name>

That’s all. After adding all this to the basic POM file and running mvn eclipse:eclipse brought me up to start working on code in my favorite IDE.


Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden / Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s