san*_*re6 3 osgi apache-felix bnd
我正在使用OSGI声明性服务(SCR)来创建组件包.我并不热衷于使用maven-scr-plugin生成的基于注释的组件xml文件.我正在手工编写component.xml.但是,我需要将Service-Component标头添加到MANIFEST文件中.我正在使用maven-bundle-plugin来构建osgi包,我可以在插件配置中给出任何指令,将这些头添加到清单文件中?
一些有用的链接:
谢谢
可以进入清单文件的任何标头都可以作为元素进入bundle插件的配置.例如,
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.2.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>
${pom.artifactId}
</Bundle-SymbolicName>
<Service-Component>
OSGI-INF/some-file.xml
</Service-Component>
....
Run Code Online (Sandbox Code Playgroud)
该<extensions>true</extensions>
行启用了任意自定义标头,但我认为Service-Component包含在已知标头集中,因此这里不需要它.
归档时间: |
|
查看次数: |
3991 次 |
最近记录: |