Hi,

if you want to include non-osgi jars into your bundle than you can place
those jars into your bundle and say Bundle-Classpath:
.,file1.jar,file2.jar,...
The dot on the beginning is necessary if your bundle itself contains files
that should be on the classpath.

If you use maven-bundle-plugin than you can use Embed-Dependency like this
(copied from one of our pom files):

<Embed-Dependency>
                            groupId=org.hibernate;artifactId=hibernate-core,

groupId=org.hibernate;artifactId=hibernate-entitymanager,

groupId=org.hibernate.common;artifactId=hibernate-commons-annotations
</Embed-Dependency>

This can work also if you wrap non-osgi jar files into an osgi bundle.

In case of WAR development sometimes if you need to access the META-INF
directory from the classloader of the WAB bundle of another bundles (like
JSF needs to access META-INF/faces-config.xml of component library jars)
you can export these packages from one JAR and use Require-Bundle in the
other. This is not a nice solution but I do not know any better.

Third option is if you merge the packages into one bundle (not including
jars but really merging). That is possible with maven-bundle-plugin as well
if you use Export-Package for the packages that are coming from the other
bundles.

Regards,
Balazs Zsoldos
Software Architect
Mobile: +36-70/594-92-34

Everit Kft.
https://www.everit.biz

Everit OpenSource
http://everit.org



2012/7/9 Völschow, Rainer <[email protected]>

> Hello,
>
> I'm new to this list and also new at the use of OSGI. My question is more
> or less general about the OSGI framework. And the one is: Exists a way to
> create a bundle, that contains onther bundles? And if so how can I achive
> this?
>
> I read a lot of website but no ones has mentioned this fact.
>
> Thanks in advanced
> reporter
>
>
> Achtung, schützen wir unsere Umwelt: Müssen Sie diese Mail wirklich
> ausdrucken?
>
>
> Allgemeiner Wirtschaftsdienst Gesellschaft für Wirtschaftsberatung und
> Finanzbetreuung mbH
> Rechtsform: GmbH, Sitz der Gesellschaft: Hannover, Registergericht: AG
> Hannover, Registernummer: HRB 55324
> Geschäftsführer: Götz Wenker (Vorsitzender), Thomas Bilitewski, Jens
> Dieter, Dr. Stephan Kaufmann
>
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen.
> Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
> erhalten haben,
> informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
> Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist
> nicht gestattet.
>
>
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to