开发者

How to configure Maven to generate the correct named OSGi bundle

开发者 https://www.devze.com 2022-12-21 21:36 出处:网络
I\'m using the maven-bundle-plugin to generate my bundles. One issue that bug me is that the finalName (jar file) does\'t conform with the actual bundle name.

I'm using the maven-bundle-plugin to generate my bundles. One issue that bug me is that the finalName (jar file) does't conform with the actual bundle name.

Internally the bundle plugin convert the version from Maven format to OSGi format (ex: 1.0-SNAPSHOOT => 1.0.0.SNAPSHOOT)

How should the 开发者_如何转开发actual propper OSGi naming can be extracted before building the jar/bundle ?

As an example consider that my artefact will be com.mycomp.proj with version 1.2-SNAPSHOOT The bundle symbolic name will be com.mycomp.proj. I'll like to customize the maven-bundle-plugin to generate the com.mycomp.proj_1.2.SNAPSHOOT instead of the current one om.mycomp.proj-1.2-SNAPSHOOT that's inherited from SuperPOM.

The idea is to extract the OSGIfied version an put it under <finalName>${project.artifactId}_${osgiVersion}</finalName&gt; .... buh has no clue how/if I can get thhis OSGified version


The finalName affects the files in the /target folder only. Once the file is installed or deployed to a repository, it is always renamed back to ${artifactId}-${version}-${classifier}.${type} which is part of the M2 repository layout standard.

0

精彩评论

暂无评论...
验证码 换一张
取 消