felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: Problems with bundle version strings produced by maven-osgi-plugin
Date Thu, 07 Dec 2006 18:42:51 GMT
Steven E. Harris wrote:
> Here's a fix:
>
>         private void addBundleVersion() {
>             // Maven uses a '-' to separate the version qualifier,
>             // while OSGi uses a '.', so we need to convert the first '-' to a '.'
>             final String version = project.getVersion().replaceFirst("((^|\\.)[0-9]+)-",
>                                                                      "$1.");
>             osgiManifest.setBundleVersion(version);
>         }

I won't claim to completely understand the regex, but looking at this is 
it completely correct? The OSGi version must 
"<number>.<number>.<number>.<qualifier>". Is this just replacing the

first "-" to a "."? If so, it won't be correct either, since "1.0-foo" 
would be converted to "1.0.foo", instead of "1.0.0.foo"...

-> richard

Mime
View raw message