How to configure Maven to generate the correct named OSGi bundle
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> .... 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.
精彩评论