an example of maven-bundle-plugin

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>1.4.3</version>
                <!-- | the following instructions build a simple set of public/private
                    classes into an OSGi bundle -->
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
                        <Bundle-Version>${project.version}</Bundle-Version>
                        <Import-Package>*</Import-Package>
                        <!-- | assume public classes are in the top package, and private classes
                            are under ".internal" -->
                        <Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${project.version}"</Export-Package>
                        <Private-Package>${bundle.namespace}.internal.*,*</Private-Package>
                        <Embed-Dependency>*;scope=compile|runtime|system</Embed-Dependency>
                        <!-- | each module can override these defaults in their osgi.bnd file -->
                        <_include>-osgi.bnd</_include>
                    </instructions>
                </configuration>
                <extensions>true</extensions>

            </plugin>


osgi.bnd

#-----------------------------------------------------------------
# Use this file to add customized Bnd instructions for the bundle
#-----------------------------------------------------------------

Bundle-Activator: com.ma.ajb.wrapper.AJBActivator
Require-Bundle: org.apache.servicemix.bundles.xerces,org.apache.servicemix.bundles.xalan


org.osgi.framework.BundleActivator worked at lifecycle layer with start() and stop() method.



maven-bundle-plugin is based on bnd tool, detail information please reference http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值