views:

135

answers:

1

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

A: 

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.

Brian Fox
Even that I know this (but didn't consider it in this context)... I voted for your response, being the right answer. Since I'm developing OSGi/RCP apps my idea was to use as a Maven final name the same OSGI bundle name (based on Bundle-SymbolicName) so do you have any suggestion how to post-process a Maven artifact (ex: after dependency:copy-dependencies) to rename them to the OSGi name (using Maven/ build-in Ant) ?