directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <akaras...@apache.org>
Subject Re: [OSGi] Studio Build - Summary of IRC Conversations
Date Fri, 14 Jan 2011 16:07:44 GMT
On Fri, Jan 14, 2011 at 4:04 PM, Pierre-Arnaud Marcelot <pa@marcelot.net> wrote:
> Hi Alex,
> Thanks for the conversation recap and i18n bundle experiment.
> Good news!
> I was able to import correctly (with a few adjustments in the pom.xml) the
> Shared i18n as an OSGI bundle (equivalent to an Eclipse plugin) in the
> current Studio trunk.

Awesome!

> I modified all the others 'libraries plugins', the ones that are not
> OSGI-fied in Shared and ApacheDS trunks and for which we create a wrapped
> plugin version of it, to point to the migrated Shared i18n OSGI bundle
> instead of the custom one.
> I was able to launch and run Studio as usual within Eclipse in a "debug
> session". [1]
> I then used the I18n class from the Shared i18n bundle in Studio's code and
> refactored the original I18n class by renaming an enum element I was using.
> [2]
> Everything went fine and Studio's code was updated with modification. [3]
> So, as a conclusion, it works!

It's a damn good feeling to see theory pan out in practice.

> Now, a few notes about the modifications I had to do to make it works. [4]
> As you can see, I had to move the generated MANIFEST.MF file to the
> 'META-INF' location (which has been added to svn:ignore).
> This is mandatory for Studio in order to run the bundle within Eclipse in a
> "debug session".
> I also modified the usage of expression to make them compliant with Maven 3
> policies, and used ${project.name} instead of ${project.artifactId} for
> 'Bundle-Name' specification.
> One last note about the branding of our OSGI bundles Bundle-SymblicName
> specification.
> The current scheme ${project.groupId}.${project.artifactId} produces some
> "unsual" OSGI Bundle-SymblicName, like
> "org.apache.directory.shared.shared-i18n" for the Shared i18n bundle.

Yeah we can change this. I just did this for the test. But there might
be better names we can use.

> This is completely valid (the '-' char is part of the specification), but
> I'm more used to seeing a package-like identifier (like
> "org.apache.directory.shared.i18n" (without the repetition of 'shared'
> and the '-' char).
> Maybe we can change that?

Sure I like this format better myself. There's just no way to make
this a general rule to follow but for the first pass we can just
manually assign the names for it.

I think when we refactor correctly for OSGi we will have cleaner
bundles that can use some kind of formula so we can move the bundle
plugin configuration into a higher level pom and not have to specify
this inside each bundle's pom.

Alex

Mime
View raw message