I believe you are looking for the Embed-Dependency option.  There are
a number of macros that can help with filtering.

You can also include the packages in the Private-Package element.  The
bundle plugin will extract the named packages and include them in the
resulting artifact.

Best Regards,
Scott ES

On Mon, Oct 29, 2012 at 11:48 AM, Jad Naous <[email protected]> wrote:
> I don't know if it helps, but you might want to tell the bundle plugin to
> extract the dependencies. That way, all the bundle metadata is ignored. I'm
> on my phone and i don't remember the setting name, but it's on the felix
> website for the plugin.
> On Oct 29, 2012 7:14 AM, "Kjell Otto" <[email protected]> wrote:
>
>> 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: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>



-- 
--
Scott England-Sullivan
Apache Camel Committer
Principal Consultant / Sr. Architect | Red Hat, Inc.
FuseSource is now part of Red Hat
Web:     fusesource.com | redhat.com
Blog:     sully6768.blogspot.com
Twitter: sully6768

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to