On 31 October 2011 10:56, Simon Goodall <[email protected]>wrote:

> I am using the maven bundle plugin to generate my bundles for some of
> my projects. My pom version string has -SNAPSHOT and this is also used
> as a literal in my MANIFEST.MF file for the bundle and package
> versioning. Is it possible to replace SNAPSHOT and use a build
> qualifier of some kind? I am deploying my bundles in a p2 repository
> for use in tycho and -SNAPSHOT is interpretted as a literal string -
> so newer builds of the plugin have the same version.
>
> I've looked at using the BuildQualifierMojo from the tycho project -
> but it would be good if there was a "proper way" to do this in the
> bundle plugin.
>
>
> https://github.com/eclipse/tycho/blob/f8e40e7a4f9a344c0728e4b29ce75e277ddb588d/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/buildversion/BuildQualifierMojo.java
>

There are some macros in bnd* that can help you manipulate the Maven
version, for example:


 
<Bundle-Version>$(replace;${project.version};-SNAPSHOT;.$(tstamp))</Bundle-Version>

Note the use of parenthesis '(' instead of curly braces '{' which stops
Maven from interpolating the bnd-specific macros.

(* used by the maven-bundle-plugin to generate the manifest, see
http://www.aqute.biz/Bnd/Macros )


> Regards,
>
> Simon
>
> --
> Simon Goodall
> Minimax Labs Ltd, a company registered in England and Wales,
> registration number 07193685, registered office: Office 4, 219
> Kensington High Street, London  W8 6BD. This message may contain
> privileged or confidential information. If you are not the intended
> recipient, please delete it and inform the sender immediately. Any
> unauthorised use of any of the information contained in this email is
> strictly prohibited.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Cheers, Stuart

Reply via email to