Osgi捆绑包不包含服务-maven-bundle-plugin

时间:2020-02-24 13:00:56

标签: java maven osgi osgi-bundle

我正在尝试为多模块Maven项目创建捆绑包,每个项目都会生成一个捆绑包,从理论上讲,该捆绑包应包含在核心响应项目中声明的服务。我这样做的尝试看起来像这样:

<plugin>
        <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.0.1</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>
                            ${project.groupId}.${project.artifactId}
                        </Bundle-SymbolicName>
                        <Bundle-Name>${project.name}</Bundle-Name>
                        <Bundle-Version>${project.version}</Bundle-Version>
                        <Bundle-Activator>third.pack.CInstaller</Bundle-Activator>
                        <Export-Package>third.pack</Export-Package>

                    </instructions>
                </configuration>
            </plugin>

生成的宣言如下:

Manifest-Version: 1.0
Bundle-SymbolicName: osgi.parent.C
Built-By: a.valchev
Bundle-ManifestVersion: 2
Bnd-LastModified: 1582546800325
Import-Package: fifth.pack,forth.pack,org.osgi.framework;version="1.8"
 ,org.slf4j;version="1.7",second.pack,third.pack
Tool: Bnd-0.0.357
Export-Package: third.pack;uses:="org.osgi.framework,org.slf4j,fifth.p
 ack,forth.pack,second.pack"
Bundle-Name: C
Bundle-Version: 0.0.1.SNAPSHOT
Bundle-Activator: third.pack.CInstaller
Created-By: Apache Maven Bundle Plugin
Build-Jdk: 1.8.0_231

我在此特定项目中提供一项服务,但未将其导入捆绑软件中。我缺少什么? 预先感谢!

0 个答案:

没有答案