-------- Original Message --------
Subject: Re: Embedding Hibernate in an OSGi bundle using
maven-bundle-plugin is hard
From: Guillaume Nodet <[email protected]>
To: [email protected]
Date: 06.04.2010 16:47
> Is there any reason why you want to embed hibernate instead of using it as a
> real bundle ?
I was expecting that having Maven manage all dependencies including
dependencies on other bundles would be possible. However, I couldn't
find any artifacts that would just let me do this:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core-osgi</artifactId>
<version>3.3.2</version>
<scope>provided</scope>
</dependency>
So embedding the existing artifacts seemed to be the next best solution.
> Also the problem isn't really maven i think, as whichever tool you use,
> you'll have to write the manifest somehow.
I agree, there's nothing wrong with Maven. But I'm a lazy bastard. Was
kind of hoping for maven-bundle-plugin to provide a 1:1 mapping: Maven
artifact ----> OSGi bundle. The thought of not ever having to touch that
manifest seemed appealing.
> Instead of going that way, I would do the following:
> * mark all imports as optional
> * deploy your bundles
> * check which packages are actually needed by deploying dependencies
> until things work
> * mark the imports from these dependencies as mandatory
> This is not really clean, but I don't see what else you can do if you don't
> want to use the existing hibernate bundles.
>
Clean sounds good. I'd rather do everything by hand than have anything
in my pom/manifest that isn't self-explanatory.
I was able to install a hibernate bundle from
http://osgi-hibernate.googlecode.com but I couldn't find a way to turn
it into a Maven artifact. Am I missing something?
-Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]