felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kjell Otto <otto.kj...@gmail.com>
Subject How to Embed-Dependency all dependencies, including some that are bundles?
Date Mon, 29 Oct 2012 14:13:50 GMT
Hi there,

I've googled and tried around some hours now, and I don't get it.
I am using the maven-bundle-plugin to bundle my project. I have some
Dependencies that are already bundles but I'm not allowed to start them
as such.

They are just jars with the appropriate OSGi metadata in them. How could
I now embed them without letting them start as a separate bundle?

Is there a way to prevent this?

Right now I've tried nearly all combinations here:

        <configuration>
          <supportedProjectTypes>
            <supportedProjectType>jar</supportedProjectType>
            <supportedProjectType>bundle</supportedProjectType>
          </supportedProjectTypes>
          <instructions>
            <!-- Bundle -->
            <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>
            <Bundle-Vendor>${project.groupId}</Bundle-Vendor>
            <Bundle-ClassPath>.,{maven-dependencies}</Bundle-ClassPath>

            <Include-Resource>{maven-resources},
{maven-dependencies}</Include-Resource>
            <Embed-Transitive>true</Embed-Transitive>
            <Embed-Dependency>*;artifactId=!org.apache.felix.scr.*</Embed-Dependency>

            <!-- Package -->
            <Export-Package>
              !${bundle.namespace}.internal.*,
              ${bundle.namespace}.*;version="${project.version}",
              org.osgi.service.component
            </Export-Package>
            <Private-Package>${bundle.namespace}.internal.*;-split-package:=merge-first</Private-Package>
            <Import-Package>*;resolution:=optional</Import-Package>
            <DynamicPackage-Import>*</DynamicPackage-Import>
            <!--<_exportcontents>org.drools.*,org.jbpm.*,org.mvel2.*,com.google.protobuf.*,com.sun.codemodel.*</_exportcontents>-->

            <!--Service-->
            <Import-Service>org.osgi.service.log.LogService</Import-Service>
            <Service-Component>
              OSGI-INF/serviceComponents.xml
            </Service-Component>
          </instructions>
        </configuration>

I'm using this right now, but I don't see how to tell the bundle
plugin to not let the embedded dependencies start as bundles.
Is there more information needed to answer my question? I would love
to provide it.

Greetings,
Kjellski

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message