[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3201?page=c...
]
Baptiste MATHUS commented on HHH-3201:
--------------------------------------
Well, I'm no OSGi expert. But from my understanding, yes, dependencies also have to be
present and osgi-compatible. But that's like project management, it's not your
role to provide those jars osgi-ly. For example, in our company we have repackaged jars to
be able to use them inside the "plugins" directory of Eclipse.
With OSGI, in the MANIFEST, basically you have to provide a
"Bundle-symbolicName" (org.hibernate.hibernate-core for example), Export-Package
and Import-Package (a Require-Bundle keyword also exist, but it's just a less-granular
way of declaring dependencies against packages: see
http://osdir.com/ml/ide.eclipse.equinox.devel/2006-03/msg00097.html for more
information).
Happily enough, a tool has been developed to be able automatically generate those
informations: BND, cf.
http://www.aqute.biz/Code/Bnd. Btw, one of the samples using BND
has been done with hibernate:
http://www.aqute.biz/Code/BndHibernate.
And last but not least, maven-bundle-plugin is actually a maven plugin that uses BND
library.
Some minutes ago, I quicky tested it and was able to generate a seemingly osgi compatible
hibernate-core-3.3.SNAPSHOT jar (I'm going to attach the patch). To see if a jar is
visible in an osgi container, I usually open Eclipse, drop the jar in plugins directory,
window/preferences/Target platform. Then hit reload. For the current example, if you see
org.hibernate.hibernate-core appear, then it's OK.
For more information, see also:
http://blog.springsource.com/main/2008/02/18/creating-osgi-bundles/
Provide osgi informations in hibernate MANIFEST.MF to be recognized
as osgi-bundle
----------------------------------------------------------------------------------
Key: HHH-3201
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3201
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.5
Reporter: Baptiste MATHUS
Original Estimate: 4 hours
Remaining Estimate: 4 hours
Hi all,
It would be great if the packaging of Hibernate could be done as osgi compatible jar.
With little configuration, some plugins already exist to do it in simply.
For informaiton, a jar can become osgi-compatible only by adding some properties inside
the META-INF/MANIFEST.MF file. It lets the jar totally usable in a non-osgi environment,
but let the jar be recognized as a "bundle" in an osgi-container (Eclipse,
Apache Felix...).
A good entrypoint for this, using maven2 to package, could be
http://felix.apache.org/site/maven-bundle-plugin-bnd.html#MavenBundlePlug....
For example, Spring already did and their available jars on
repo1.maven.org can be put
directly in a eclipse/plugins directory and be recognized as a bundle/plugin.
Cheers.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira